select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:35:24' and ( id in (2421,2422,10791,10792,10793,10794,10795,10796,10797,11465,11466,112668,107297,139694,139693,139692,139640,140002,140003,140004,120318,120393,120394,120395,120397,120413,120414,139894,139893,139892,139888,139856,139855,138295,138294,138293,138292,138291,138256,138252,138253,138254,138250,138251,138249,138245,138208,138207,138200,138199,138194,138193,138192,138191,138181,138778,138178,138177,138176,138779,138174,138173,138171,138172,138148,138129,138120,138121,138122,138126,138615,138119,138118,138117,138116,138111,138110,138109,138108,138107,138106,138105,138086,138085,138073,138072,138070,138071,138069,138068,138067,138825,138066,137992,137973,137972,137971,137943,137942,121449,137851,137850,137849,137848,137816,137813,137811,137765,137764,137762,137763,137753,137752,139038,137751,139039,137722,137721,138508,138509,137584,137583,137573,137571,137572,137570,137546,137545,137542,137514,137513,137512,137510,137511,137508,137509,137488,137459,139208,139209,137419,137418,137417,138601,137270,137269,137262,137261,137250,137248,122438,139058,122619,122650,122651,139282,136997,136996,136994,136995,136972,136970,136968,136969,136967,136895,136894,136893,136892,136891,136889,136890,136888,123216,136771,136772,136773,136774,136760,136761,136762,136756,136755,123422,138749,136697,136695,136696,138745,136694,136693,136692,136661,136660,136659,136658,136536,138692,138693,136327,136326,136325,136304,136302,136303,138881,136301,136298,136296,138882,136295,136294,136293,136292,138879,138880,136289,138883,136286,136285,136284,136205,136204,139531,136159,136158,136157,136103,136102,136101,136100,136083,136009,136008,136007,136005,136006,136004,136003,136002,124772,124773,124774,124775,124779,135838,135837,135836,138924,135785,135784,135783,135779,135778,125104,125105,125106,125108,125110,125118,125119,125120,125121,125122,135733,135713,135712,135711,139213,135701,139214,135700,135699,135698,135697,135693,139489,139488,135564,135563,135562,135515,135514,135513,135505,135504,135502,135503,135501,135474,135405,135401,135399,135397,135398,135396,135395,135394,125793,125830,139259,138549,138550,138551,138552,135164,135163,135162,135161,135160,138547,138548,135106,135053,135051,135034,135033,135032,135031,135030,135029,135028,135016,135015,135014,134779,134778,134777,134776,134775,138435,139204,138919,138921,134622,134619,138457,134426,138458,138459,134404,134405,134403,134401,139367,134397,134398,134399,127622,127623,138803,138804,138805,138806,138808,134237,127914,139343,139342,139340,139339,139338,139430,139337,139328,133870,139327,133860,138456,133759,133756,133758,133757,139311,139310,139306,133681,133680,133678,133679,133665,139190,133611,138956,138574,139261,139260,128777,128778,128779,128780,128781,128782,128783,128784,128785,128788,128848,139241,128850,128851,128922,128923,128924,128925,128926,128927,128928,128929,128930,128931,128932,139168,139165,139212,139210,139205,139203,139172,139173,139174,139175,139171,139170,139169,139167,139166,139164,139163,139162,139161,139160,133424,133423,133422,139146,139142,139141,139139,139140,133310,133309,133308,133307,133306,133305,133304,133301,138507,133300,133299,133298,133297,133296,134621,134620,133249,133248,133243,133244,133242,133241,133240,133239,133237,133238,133236,133235,133234,133233,133231,133232,133230,133229,133212,133211,133210,133209,133208,133207,133206,133163,133160,133157,133124,133123,133122,133118,133117,133116,133115,133089,133085,133086,133084,133083,133082,133081,133078,133076,133075,133074,133073,138684,138683,129597,138746,138747,138750,138751,138741,138742,138743,134400,132994,132993,132992,132990,132989,138777,139042,139041,139040,132827,132790,132789,132788,132787,132740,132739,132738,132687,132686,132685,132684,132683,132682,132681,132668,130093,139341,138969,138968,138681,138682,132573,132572,132570,132569,138957,138958,138934,130265,130316,138923,138922,138920,132425,132424,132423,132422,132421,132420,132419,132418,132417,132416,138912,132322,132321,132320,132319,132310,132309,132296,132295,132294,132293,132292,132291,132290,139326,132289,132288,132287,132237,132235,132234,132233,130617,139691,130711,130712,130713,130715,132071,132070,132069,132068,132067,132066,138884,132045,132044,132021,132020,132019,132018,132017,132016,139033,131987,131985,131984,131983,131982,131960,131957,131857,131856,131855,131854,131787,131786,131785,131730,131729,131728,131727,131726,131725,131724,131723,138967,131708,131707,131706,131681,131680,138811,138810,138809) ) 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:35:24' and ' at line 1