select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 05:53:45' and ( id in (118644,139695,126487,126486,95755,95756,126484,126483,126479,126478,126477,139669,139670,139641,139658,139995,139998,140034,139962,139963,139968,139969,139972,120341,120383,139901,139890,139866,139865,139864,139863,139862,139861,138953,138244,138243,138242,138241,138238,138237,138224,138225,138226,138227,138198,138197,138196,138195,139804,138153,138151,138150,138149,138754,138138,138139,138616,138617,138618,138619,138620,138631,138632,138633,138634,138635,121109,138045,138046,138047,138015,138014,138013,138012,138011,138010,138009,137979,137978,121451,121452,137871,137870,137861,137860,137859,139232,137842,137841,137840,137839,137834,137833,137832,137831,137830,137829,139803,138469,139035,139036,137743,137742,137711,137710,137649,137648,137647,137637,137636,137635,137634,137633,137632,137610,137599,137598,137597,137596,137516,137492,137491,137482,137481,137480,137479,139206,139207,137396,137395,137394,137393,137392,137290,137289,137288,122386,122387,122434,122435,122436,122439,122440,122441,122442,122444,122451,122554,122619,137113,137112,137111,122667,122668,122669,122670,122671,122672,122673,122674,122675,137079,137078,137077,137076,137058,137057,137056,137015,137016,137017,137018,136962,136959,139279,136958,136957,136955,136943,136942,136940,136938,136937,122961,136932,136923,136922,136921,136920,136891,136889,136890,136888,136880,136876,136858,136857,136856,136852,139753,136791,136749,136750,136753,136748,136747,136746,136669,136665,136666,136664,136661,136660,136659,136658,136637,136636,136597,136520,136521,136508,136397,136396,136395,136348,136344,136343,136342,136341,136340,124166,124167,124178,124179,124180,136258,136248,136249,136223,136222,136218,136217,136216,136214,136213,136211,138816,136156,136155,136105,136093,136094,136092,136091,136088,136089,136090,136087,136086,136084,136083,136077,136080,136074,136052,138888,135978,135980,135977,135976,135975,135973,135974,135941,135940,135939,135938,135937,124803,124804,135936,135935,135934,135933,135932,135931,135930,135929,135928,135927,135926,135925,135924,135923,135922,135921,135919,135920,135918,135917,135916,135915,135879,135853,135852,135851,135835,135834,135833,135832,135831,135829,135786,138924,135785,135784,135783,125124,135730,135728,135729,135716,135539,139275,139276,135497,135496,139785,139473,139471,139472,139468,139470,139469,135383,135382,139467,139466,135378,135377,139465,139464,135325,135324,139034,139463,139461,139462,135172,135159,139446,139447,135124,135125,135123,135121,135122,135120,135119,135118,126344,126355,135063,135005,135004,134958,126680,126681,134833,134832,134831,134830,138980,126881,126919,126920,126921,126922,126923,134794,134795,138465,138464,134766,134765,134764,134735,134733,134732,134694,134695,133390,139243,139233,134611,138431,138432,134584,134583,134582,127353,134578,134579,134531,134530,134515,134493,134494,134488,134489,134487,134446,127610,139363,134199,138952,134163,134162,134161,134160,134156,134155,134154,134145,134138,127913,139176,127923,127924,127962,134088,134089,139699,139700,133266,139698,133875,139328,133874,133872,133873,139327,133857,133838,133836,133837,139764,133738,139309,138948,138911,138947,133693,139191,133675,133673,133674,133670,133671,133672,133669,133668,139192,139193,139194,139195,139196,133636,133635,133613,133614,133615,138945,139280,133574,133575,133576,139278,128601,133551,133553,133554,133555,133556,133552,133550,133549,139277,139697,133506,133505,128831,139246,139244,139245,128859,128860,128862,128863,128864,133499,133498,133496,138572,139197,139198,139177,139178,138434,133391,133387,133369,133368,139138,133270,133268,133267,133215,133214,129409,129410,129411,129412,129413,129419,133146,133145,133144,133143,133134,133133,133093,133092,133090,133091,133066,133065,133064,133063,133045,133044,133043,133017,133009,132915,132914,132913,132912,132911,132910,132909,132908,132907,132906,132905,132904,132903,132902,139696,132843,132841,132842,138946,132747,132743,132709,130056,130060,130061,132666,132667,132665,138983,132527,132526,132525,138934,130272,138933,130373,132412,132411,138433,132348,132347,132346,132345,132332,132331,132296,132295,132294,132293,132292,132291,132290,139326,132289,132288,132287,132284,132283,132282,132281,132280,132279,132278,132277,132276,132275,132274,132273,132272,132271,132269,132268,132267,132265,132264,132263,132262,132261,132260,132256,132255,132254,139242,132240,132239,132195,130736,130737,130743,130749,132122,132110,132079,132078,132034,132024,132023,132007,132006,131996,131995,131994,131992,131990,131988,131976,131975,131974,131973,131972,131920,131921,131919,131918,131917,131916,131915,131914,131913,138581,138582,138583,138584,131839,131835,131830,131828,131826,131825,131823,131822,131821,131820,131818,131817,133692,131787,131786,131785,131763,131759,131758,131747,131746,138944,131745,131698,133676,131659,131658,131657,131656,138817,138818,138814,138813,131607) ) 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 05:53:45' and ' at line 1