select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 07:18:05' and ( id in (112239,107297,119312,119313,119314,119315,119318,119323,119325,119326,119532,139642,139649,140007,140008,140046,140047,139918,139919,139920,139921,139922,139923,139924,139925,139926,139927,139928,139929,139930,139931,139932,139933,139934,139935,139936,120346,120347,120348,120349,120350,120466,120472,120475,120479,120480,120481,120482,120497,139884,138290,138288,138942,138287,138286,138285,138210,138211,138208,138207,138791,138755,138093,138094,138092,137973,137972,137971,139037,137746,137456,137455,137454,137453,137452,137451,139208,139209,137412,137411,137410,137409,137408,137407,137405,137406,137404,137400,137399,137398,137397,137378,137377,137376,137375,138362,138363,137296,137295,137294,137293,137292,139230,122465,122466,122467,122468,122469,137201,137200,137199,137198,137197,137160,137159,137088,137086,137087,137074,137075,137066,137065,137064,137028,137029,137030,137031,137027,137007,136998,139287,138605,122972,122973,136855,136854,136853,138757,123220,123221,138444,123469,138360,138359,138358,138357,138355,138356,136624,136623,136622,136621,138413,136620,136619,123598,123599,123600,123601,123602,123603,123604,123605,136600,136601,136602,136603,136604,138756,123751,136447,136438,136437,138798,138799,136389,136383,138789,136367,138790,136322,136321,136320,124161,124162,124163,124188,124189,138732,138733,138734,138735,138736,138737,136058,136057,136056,136055,136054,136053,136049,136050,136051,136048,136047,136046,136045,136044,136043,136042,138345,138346,138347,138348,138349,138350,138351,138352,124765,124766,139512,124839,124840,124841,124842,124843,124844,124845,124846,124847,124848,124850,139503,135864,135863,125102,125103,135718,138603,138604,135555,135554,135551,135550,135549,135548,135417,135414,135415,135416,135408,135407,135405,138354,135401,135399,135397,135398,135396,135395,135394,125798,125799,125800,125801,125802,135273,135274,135267,135235,135237,135238,135239,135240,135241,135242,138529,138530,138531,135234,139285,135218,139286,135216,135215,135214,135213,135212,135211,135210,135209,135176,139429,139428,139427,135034,135033,135032,135031,135030,135029,139426,135026,135025,135024,135023,139425,139424,139423,134991,134990,139422,139421,139419,139420,139418,139417,139416,139414,139415,139413,139412,139411,139409,139410,139408,139407,139406,139405,139404,134847,134846,134845,134844,134843,134840,139403,139402,126898,126899,139401,126925,134793,139400,139398,139399,139397,134731,134730,139395,139396,139394,127107,139393,138445,139391,139392,139390,139388,139387,139386,139385,139384,138528,134631,139381,139382,139383,139380,139379,139378,139377,134554,134552,134551,134550,134548,134549,134546,134544,134545,134543,134542,134541,134539,134540,139376,134439,134440,134441,134436,134434,134435,134432,134433,127554,138708,127613,127621,138794,134362,138795,134359,138797,134357,138796,134353,134355,134356,134349,134347,134346,139354,139353,139352,134186,134174,134175,134173,134172,134143,134142,134140,134141,134139,134136,138715,134035,134036,134037,134031,134032,134029,134028,134026,134027,134023,134022,134021,134020,134019,134018,134014,134015,134016,134017,134013,134009,134008,133860,133845,133844,133843,133842,133841,133840,139269,139268,139267,139266,138525,138526,138527,128825,128826,128827,128828,128855,128856,128857,138730,138353,139210,139202,138729,129074,129075,129076,129077,129078,129079,129080,129081,129082,139389,138725,133459,139159,139158,139157,139154,139155,139156,133374,133373,133372,133371,133370,138709,138710,133353,138717,138718,138719,138720,138721,138722,138723,138724,138726,138727,138716,138714,138713,138712,133228,133227,134547,138731,134553,129555,138707,129582,138711,139071,139070,133042,133041,129659,138792,138793,138848,132762,132761,132760,132759,132758,132757,132756,132755,132754,132753,132752,132751,132713,132711,132712,132710,134025,132690,132689,132688,138989,138986,138987,138988,138984,138985,138728,132612,132611,132610,132609,132608,132607,132606,132605,132604,132603,132602,132601,134007,134006,138685,138686,132516,132515,132514,132513,132512,132511,132510,132509,132508,132504,132503,132502,138361,132435,132434,132433,132344,132343,132342,132341,132340,132339,132338,132337,132329,132328,130522,132266,132118,132117,132116,132042,132039,132038,132037,132036,132035,132033,132032,132031,132030,132029,132028,132027,132026,132025,132003,132002,132001,132000,131999,131912,138577,131899,138578,131898,131894,131892,138579,131890,131888,131887,131886,131885,131884,131883,138580,138576,131876,131874,131872,131871,131870,131869,131868,138575,131867,131866,131865,131864,131853,138849,138365,138364,131755,131754,131753,131752,131751,131738,131737,131736,138800) ) 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 07:18:05' and ' at line 1