select distinct from dc_coupons where approved='1' and start_date_dt<'2012-05-25 04:18:12' and ( id in (119298,119336,119337,119339,119403,119594,119595,119596,119597,139990,139991,139961,120318,120466,139857,139180,138326,138325,138320,138319,138298,138297,138296,138252,138253,138254,138250,138251,138249,138245,138201,138157,138158,138163,138164,138165,138166,138167,138168,138169,138170,138156,138155,138148,138143,138142,138631,138632,138633,138634,138635,138099,138065,138060,138058,138056,138057,138054,138055,137980,137945,137943,137942,121460,121465,121466,121467,137871,137870,137837,137835,137836,137774,137773,137772,137722,137721,138452,138453,137685,137661,137651,137650,137641,137640,137639,137638,138455,137617,137616,137615,137594,137592,137586,139460,137507,137505,137506,137504,137502,137500,137501,137499,137498,137497,139206,139207,138602,137359,137358,137357,137356,137291,137284,137281,137280,137279,137278,139228,122439,122440,122441,122442,122444,122471,122472,122473,122474,122476,122477,122478,137160,137159,137090,137028,137029,137030,137031,137027,136993,136989,136988,136987,136986,139281,139287,136948,123346,123347,136701,123469,139911,138783,136373,138784,136372,136371,136370,136369,136368,138785,136365,136333,138879,138880,124169,124170,124171,124172,124173,124174,124175,124186,139535,139534,136215,136211,136206,139531,136185,124410,139004,138407,138406,138404,138405,136103,136102,136101,136100,135983,135982,135961,135945,135944,135900,135890,135891,135892,135893,135897,135898,135899,135817,135816,135815,135802,135801,135800,135799,135797,135798,138916,135772,135771,135770,135769,125101,135756,139910,135735,135736,135734,135707,135706,135705,135704,135703,139217,135680,135679,135663,135573,135574,135556,135538,135537,135532,135531,135530,135493,138403,138401,138402,135424,135423,135422,135421,135420,135419,135418,139473,139471,139472,139468,139470,139469,138400,125731,125733,125796,125797,135383,135382,139467,139466,135378,135377,139465,139464,135316,135313,135315,135306,135304,135303,139463,139461,139462,135246,138536,138537,138538,138557,138558,138559,135225,135221,135222,135223,135224,135220,139285,135218,139286,135216,135215,135214,135213,135212,135211,135185,135183,135184,135182,135181,135180,135179,135178,138554,138555,138556,135151,135150,135149,135148,135147,135146,135145,135144,139446,139447,135117,135116,135115,126344,139791,138398,138399,135073,135072,135063,138812,135062,135061,135060,135059,135046,135044,135042,135041,135040,135039,138807,135038,135037,135036,139152,134978,134976,134977,134975,139110,126683,126684,126685,138990,126889,126913,126914,134764,139768,134696,134697,134698,127073,134679,134676,134677,134678,134675,139233,127257,138516,134589,134586,134587,139790,138597,139789,134558,134557,138461,139766,139767,139366,138451,134388,134389,139365,139364,134262,134263,134236,139765,139346,139347,127932,139345,134088,134089,139344,139430,133884,133881,133880,133879,133878,133877,139325,138468,133792,133791,139313,139312,133718,133716,133717,139187,139188,139189,133657,133658,133659,133660,133646,133645,133638,133637,133593,133592,138954,133582,133581,133579,133547,133545,133546,138553,133537,133536,128695,128696,133514,128714,128715,128719,128720,138373,128722,128743,128744,128745,128746,128747,133512,133511,139254,139241,128873,128874,138515,133500,133499,133498,133496,133491,133490,133489,133488,133487,133486,133485,133484,133483,133481,133480,133479,133476,133475,133474,133473,133472,133471,133470,133468,133469,128941,128942,139229,133467,133466,139221,128974,139186,139185,139184,139183,139182,139181,133465,139179,133464,133463,129112,129113,129114,138437,139532,133442,133441,133440,133439,133438,133437,133436,133435,133400,133398,133397,133396,139218,133395,133394,139153,133369,133368,133367,133366,133364,133363,133362,133295,133294,133292,133293,133251,133225,133224,133223,133222,133221,133220,139307,133219,133205,133204,133203,139315,133170,133169,133168,133167,133166,133165,133164,133134,133133,139096,133114,133109,133108,133107,133106,133105,133104,133103,133102,138707,139071,139070,133057,133055,133054,133053,133052,133051,139533,132928,132927,132926,132925,132877,132876,132875,132874,132873,138840,132870,132869,132867,132866,132860,132859,132858,132857,132856,138838,138839,132855,132854,132799,132798,132786,132785,132774,132771,138598,132769,132768,132767,138599,132745,132744,132736,132734,132732,132729,132727,138614,132725,132703,132702,132675,132674,132673,132668,138965,138964,132540,139270,132538,132537,132536,132535,138934,132431,132384,138912,132351,132326,132325,132324,132323,132259,132258,132257,132237,132235,132234,132233,132217,132155,132154,132141,132140,130711,130712,130713,130715,130736,130737,130743,138376,130749,138467,132113,132112,131943,131942,139119,138577,131899,138578,131898,131894,131892,138579,131890,131888,131887,131886,131885,131884,131883,138580,138374,138847,138845,138846,138844,138843,138842,138841,131779,131776,131775,131774,131773,131772,131771,131770,131769,131768,131744,131743,138821,138822,138823,131713,131711,138820,138819,131689,131688,131687,131673,138814,138813) ) 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:18:12' and ' at line 1