select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:59:22' and ( id in (10479,10480,10481,107297,139664,139663,139964,139965,139966,120413,120414,139889,138295,138294,138293,138292,138291,138256,138245,138228,138230,138181,138778,138779,138174,138173,138159,138160,138161,138171,138172,138129,138126,138463,138018,138017,138016,121473,121474,121475,137861,139232,137824,137823,137822,137821,137816,137813,137811,137803,137802,137801,137800,137765,137764,137762,137763,137605,137604,137585,137546,137545,137514,137513,137512,137510,137511,137508,137509,139208,139209,137250,137248,139786,139058,137134,137133,137132,137131,137130,137129,137128,137127,137126,137125,137124,137123,139595,139594,139593,137012,137011,138568,136912,136913,136914,136795,136794,136792,136793,136771,136772,136773,136774,136760,136756,136755,136731,136730,136728,136729,138749,138443,136697,136695,136696,138745,136694,136693,136692,136677,138442,136536,138692,136534,138693,136533,136532,136526,138441,124176,136159,136158,136157,138851,138852,136029,136028,136026,138853,124772,124773,124774,124775,135894,135895,138926,125104,125105,125106,125108,125110,135659,135654,135655,135656,135657,135564,135563,135562,139275,135528,135527,135526,135525,135524,135523,135522,139276,135521,135405,135401,135399,135397,135398,135396,135395,135394,135359,135358,135356,135357,139705,126350,135055,134965,134963,134962,134961,134960,126900,126901,126903,126904,126905,139240,134679,134676,134677,134678,134675,134617,134612,134613,134614,134559,127418,134485,134486,134484,134483,134482,134470,127501,127502,134442,134443,134444,134445,138457,138458,138459,138462,134404,134405,134403,134401,134397,134398,134399,127622,127623,134264,134237,138567,139343,139342,139340,139339,134062,139338,134034,133989,133888,133887,133885,133886,139328,139327,139325,138456,139317,139316,133781,133780,133779,133777,133776,133775,133773,133772,133771,133770,133759,133756,133758,133757,139311,139310,139191,139306,133665,139190,139192,139193,139194,139195,139196,133639,133626,133627,133630,138929,128676,128712,128713,128738,128739,128777,128778,128779,128780,128781,128782,128783,138523,138524,128829,128830,128835,128848,139241,128850,128851,139239,139237,139210,139197,139198,129035,129036,129039,129040,129041,129063,129064,129065,129066,129067,129068,129069,129085,139160,138494,133335,133333,133331,133330,139146,139142,139141,139139,139140,133309,133308,133307,133306,133305,133304,133243,133244,133242,133241,133240,133239,133237,133238,133236,133235,133234,133233,133231,133232,133230,133229,133200,133163,133160,133157,138684,138683,129597,138746,138747,138750,138751,129622,134400,133011,133010,138777,138840,132870,132869,132867,132866,132860,132859,132858,132857,132856,138838,138839,132855,132854,132824,132823,132822,132821,132820,132819,139019,139018,132773,139495,130093,139341,130107,139759,139238,138681,138682,132573,132572,132570,132569,132533,132532,132531,132530,132529,132528,138934,130272,138932,138569,139302,139303,138931,138930,138928,138927,132450,132448,132449,132447,132446,132445,132444,132443,132414,138912,138909,138908,138907,132367,132368,132322,132321,132320,132319,132296,132295,132294,132293,132292,132291,132290,139326,132289,132288,132287,132253,132252,132237,132235,132234,132233,132231,132230,132229,132228,132227,132226,132225,132223,132222,132221,132212,132211,132210,132209,132208,138887,132077,132076,138886,138885,139033,131987,131985,131984,131983,131982,131857,131856,131855,131854,131839,131835,131830,131828,131826,138847,131825,131823,131822,131821,131820,131818,131817,138845,138846,138844,138843,138842,138841) ) order by creation_date_dt desc limit 0, 10 |1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:59:22' and ' at line 1