select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 05:36:26' and ( id in (126487,126486,95755,95756,126484,126483,139980,139981,139982,139983,140024,140025,140026,140027,139882,139881,139869,139859,139860,139858,138953,138244,138243,138242,138241,139625,139624,139623,138154,138135,138134,138133,138616,138617,138618,138619,138620,121109,138045,138046,138047,137940,137939,137933,137932,137889,121451,121452,137871,137870,137834,137833,137832,137831,137830,137829,137788,137787,137786,137784,137707,137706,137705,137649,137648,137647,137641,137640,137639,137638,137635,137634,137633,137632,137609,137608,137579,137578,137516,137477,137463,137462,137461,137459,137396,137395,137394,137393,137392,137290,137289,137288,137287,137286,122386,122387,122434,122435,122436,122451,137122,137121,137119,137120,137118,137117,137089,137085,137015,137016,137017,137018,136962,136959,139279,136958,136957,136955,136941,136858,136857,136791,136749,136750,136753,136748,136747,136746,136736,136735,136642,136637,136636,123615,123616,123617,136536,138692,138693,136520,136521,136469,136468,136467,136466,136465,136464,136461,136460,136459,136458,136456,136435,136434,136431,136432,136433,136397,136396,136395,124178,124179,124180,136231,136230,136212,136195,136191,136193,138816,136171,136170,138752,138753,136105,135998,135997,135941,135940,135939,135938,135937,124803,124804,135936,135935,135934,135930,135929,135928,135927,135926,135925,135924,135923,135922,135921,135919,135920,135918,135917,135916,135915,135867,135866,135865,135786,125124,135716,138588,135653,138589,139275,139276,135497,135496,139288,135480,135479,135440,135441,135439,135438,135437,139473,139471,139472,139468,139470,139469,139467,139466,139465,139464,139463,139461,139462,135265,135264,135263,139450,139449,139446,139447,135095,126355,135090,135053,135051,135016,135015,135014,135005,135004,126881,126919,126920,126921,126922,126923,138464,134699,134700,134701,139264,139243,139233,127259,127260,138431,138432,134584,134583,134582,127353,134574,134515,134498,134499,134496,134493,134494,134481,134447,134448,134449,134386,138678,138808,127666,139810,134307,138952,134171,134170,134169,134168,134167,127913,139176,127924,127962,134042,134039,134040,134041,128038,133266,138671,138672,133857,133738,138911,139191,139192,139193,139194,139195,139196,133613,133614,133615,138945,139280,133574,133575,133576,133537,133536,139263,139262,133506,133505,128822,128823,128824,139809,139244,139245,128859,128860,128862,128863,139168,139165,138572,139197,139198,139177,139172,139173,139174,139175,139178,139171,139170,139169,139167,139166,139164,139163,139162,138434,133387,139138,133295,133294,133270,133268,133267,129409,129410,129411,129412,129413,133146,133145,133144,133143,133134,133133,134495,139081,139084,139082,139083,138679,133026,133025,133023,133022,133021,133020,133019,132845,132844,139754,132791,138946,132747,132743,130056,130060,130061,132666,132667,132665,138983,139080,138677,132559,138675,138676,132527,132526,132525,138934,138674,138673,138670,138669,130272,138933,132413,138433,132383,132382,138905,138906,132284,132283,132282,132281,132280,132279,132269,132268,132267,139242,132240,132239,130736,130737,130743,130749,132109,132107,132106,132089,132088,132086,132087,132085,132082,132081,132074,132071,132070,132069,132068,132067,132066,132058,131996,131995,131994,131976,131975,131974,131973,131972,131960,138581,138582,138583,138584,131839,131835,131830,131828,131826,131825,131823,131822,131821,131820,131818,131817,131787,131786,131785,131763,131747,131746,138944,131745,131744,131743,138817,138818,138814,138811,138813,138810,138809,131627,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:36:26' and ' at line 1