syntax error: select * from ( SELECT ROW_NUMBER() OVER(PARTITION BY a.id) AS row_num, a.thumb, a.photo, a.ten_vi, a.giaban, a.tenkhongdau_vi, a.loai, b.thumb as thumbnail, b.photo as photonail FROM table_product a left join table_photo_detail b on a.id = b.id_post where a.id_list= and a.id!='' and a.hienthi=1 and a.type = 'product' order by a.stt,a.id desc) a where a.row_num = 1 limit 0, 10