select distinct from dc_coupons where approved='1' and start_date_dt<'2012-02-05 17:43:05' and ( id in (118488,126487,126486,126484,126483,107297,5392,119515,119516,119517,119660,119661,120318,120327,120328,120393,120394,120395,120397,120466,138326,138325,138295,138294,138293,138292,138291,138283,138282,138281,138280,138279,138278,138276,138277,138256,138245,138209,138221,138222,138223,138208,138207,138206,138205,138185,138186,138184,138183,138182,138181,138180,138179,138178,138177,138176,138130,138129,138128,138120,138121,138122,138125,138126,138127,138119,138118,138117,138116,138115,138114,138113,138112,138111,138110,138109,138108,138107,138106,138105,138064,138063,138062,138061,138060,138059,138018,138017,138016,137989,137990,137991,137988,137987,137956,137955,137953,137954,137952,137944,137945,137943,137942,137919,137918,137917,121457,121458,121477,137861,137862,137858,137857,137856,137855,137854,137824,137823,137822,137821,137817,137816,137814,137815,137813,137812,137811,137810,137809,137808,137807,137803,137802,137801,137799,137800,137798,137796,137797,137765,137764,137762,137763,137729,137728,137727,137701,137695,137660,137653,137654,137655,137656,137657,137658,137659,137651,137650,137637,137636,137605,137604,137584,137583,137577,137576,137575,137574,137546,137545,137544,137543,137542,137515,137514,137513,137512,137510,137511,137508,137509,137503,137504,137502,137500,137501,137499,137498,137497,137476,137475,137473,137474,137472,137388,137387,137386,137382,137383,137384,137385,137381,137380,137327,137326,137325,137305,137304,137270,137269,137260,137259,137255,137254,137253,137252,137251,137250,137249,137248,137208,137207,137206,137205,137204,137203,137202,137160,137158,137159,137157,137135,137134,137133,137132,137131,137130,137129,137128,137127,137126,137125,137124,137123,137084,137083,137082,137081,137080,137069,137068,137067,137061,137060,137036,137037,137038,137039,137013,137014,137012,137011,136997,136996,136994,136995,123182,136795,136794,136792,136793,136785,136784,136783,136782,136771,136772,136773,136774,136760,136759,136758,136756,136757,136755,136750,136751,136738,136732,136733,136734,136731,136730,136727,136728,136729,136726,136724,136725,136723,136722,136721,136720,136719,136717,136718,123422,136700,136699,136698,136697,136695,136696,123469,136694,136693,136692,136681,136680,136675,136607,136605,136606,136567,136566,136537,136536,136535,136534,136533,136532,136486,136485,136472,136471,136470,136469,136468,136467,136466,136465,136464,136463,136462,136461,136460,136459,136458,136457,136456,136454,136453,136381,136366,136365,136364,136361,136362,136363,136359,136360,136358,136333,136283,136282,136281,136280,136279,124190,124191,136252,136251,136250,136227,136228,136229,136207,136205,136204,136177,136178,136179,136180,136181,136182,136183,136159,136158,136157,136107,136106,136037,136036,136035,136034,136032,136033,136031,136030,136029,136028,136026,136027,136009,136008,136007,136005,136006,136004,136003,135957,135955,135956,135954,124772,124773,124774,124775,124779,124788,124789,135879,135886,135894,135895,135896,135787,135788,135786,125101,125104,125105,125106,125108,125110,125118,125119,125120,125121,125122,125125,135724,135723,135722,135702,135701,135700,135699,135698,135697,135661,135662,135660,135659,135654,135655,135656,135657,135658,135564,135563,135562,135476,135475,135473,135474,135406,135405,135402,135403,135404,135401,135400,135399,135397,135398,135396,135395,135394,125830,135362,135361,135360,135359,135358,135356,135357,135333,135326,135327,135310,135309,135262,135261,135252,135253,135250,135251,135245,135244,135235,135236,135237,135238,135239,135240,135241,135242,135243,135234,126203,135126,126331,126332,126333,126350,135083,135082,135081,135080,135053,135052,135051,134965,134964,134963,134962,134961,134960,134959,134819,134818,134817,134816,134815,134814,134813,134811,134812,126896,126897,126913,126914,134735,134734,134685,134686,127094,134684,131563,131564,134682,134683,134679,134680,134681,134676,134677,134678,134675,134646,134647,134648,134649,131590,134558,134559,134557,127418,134517,134516,134485,134486,134484,134483,134482,134481,134469,134470,134471,127501,127502,133928,134404,134405,134403,134401,134396,134397,134398,134399,134378,134377,134373,134374,134375,134376,134372,127622,127623,134285,134284,134283,134279,134277,134278,134276,134261,134240,134239,134237,134238,134235,134234,134233,127789,134212,134213,134214,134211,134210,134180,134181,134182,134178,134179,131589,127914,127962,134084,134085,134034,133989,133972,133970,133971,133969,133937,133938,128130,133936,133935,133934,133931,133932,133933,133930,133929,133925,133926,133927,133920,133921,133919,133909,133903,133902,133901,133888,133887,133885,133886,132304,131556,133832,133830,133831,133802,133801,133782,133781,133780,133779,133777,133778,133776,133775,133773,133774,133772,133771,133770,133739,133740,133744,133743,133742,133703,133704,133701,133702,133688,133687,133639,133622,133623,133624,133625,133626,133627,133628,133629,133630,133611,133605,133604,133602,133603,133601,133598,133599,133600,133597,133596,133591,133590,133559,133557,133537,133536,128676,128701,128702,128703,128704,128705,128712,128713,128728,128729,128732,128733,128734,128735,128736,128737,128738,128739,133506,133505,128829,128830,128835,128836,128837,128838,128839,128840,128841,128842,128843,128844,128845,128846,128847,128848,128849,128850,128851,128873,128874,128941,128942,129005,129032,129033,129034,129035,129036,129037,129038,129039,129040,129041,129059,129060,129061,129062,129063,129064,129065,129066,129067,129068,129069,129090,129091,131586,129115,129116,129117,129168,133345,133344,133343,133342,133341,133340,133339,133338,133337,133336,133309,133308,133307,133306,133305,133304,133295,133294,133257,133256,133255,133254,133253,133252,133245,133243,133244,133242,133241,133240,133239,133237,133238,133236,133235,133234,133233,133231,133232,133230,133229,133217,133200,129407,133183,133182,133181,133180,133179,131585,133142,133140,133141,133139,133114,133113,133112,133111,133110,134518,133078,133077,129563,129564,133068,133067,129597,129598,129603,129604,129605,129606,129613,129614,129615,129616,129622,134402,134400,133040,133039,133038,133037,132901,132900,132898,132899,132880,132872,132871,132870,132869,132868,132867,132866,132865,132864,132863,132862,132861,132860,132859,132858,132857,132856,132855,132854,132818,132817,132816,132815,132814,132813,132812,132790,132789,132788,132787,132773,129951,130035,130036,130037,132664,132663,132662,132661,132660,132659,130092,130093,131596,130133,130134,131576,131575,131574,132584,132583,132582,132575,132574,132573,132571,132572,132570,132569,130272,130273,132501,133258,132463,132464,132460,132450,132448,132449,132447,132446,132445,132444,132443,130357,132414,132409,132408,132407,132406,132405,132404,132403,132374,132373,132372,132371,132370,132369,132367,132368,132317,132318,132316,132315,132314,132313,132311,132312,132308,132307,132306,132305,132303,132302,132299,132298,132297,132296,132295,132294,132293,132292,132291,132290,132289,132288,132287,132286,132253,132252,132238,132237,132235,132236,132234,132233,132231,132232,132228,132227,132226,132225,132224,132223,132222,132221,132178,132177,132176,132161,132160,132139,132138,132137,132136,132121,132120,132119,132013,132012,132011,132010,132009,131987,131986,131985,131984,131983,131982,131971,131970,131969,131968,131967,131966,131965,131960,133745,131863,131862,131861,131860,131859,131858,131857,131856,131855,131854,133741,131790,131789,131788,131779,131757,131756,131730,131729,131728,131727,131726,131725,131724,131723,133558,131686,131685,131684,131683,131682,131681,131680,131679,131655,131654,131653,131652,131651,131650,131649,131648,131647,131646,131645,131644,131643,131642,131641,131640,131639,131638,131637,131636,131635,131631,131612,131611,131610) ) 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-02-05 17:43:05' and ' at line 1