SELECT * FROM `inko_car_data_sample` WHERE `cd_state` = 1 AND `cd_gubun` =1 AND `cd_brand` = '10059' and mb_id in (22, 25, 21) AND cd_gugun in('광명','김포','부천','수원','시흥','안산','안양','용인','강남구','강서구','서초구','성동구','양천구','영등포','남동구','동구','미추홀구','부평구','서구') and mb_rank=1ORDER BY cd_m_date_yyyy desc LIMIT 0, 20
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY cd_m_date_yyyy desc LIMIT 0, 20' at line 1