select pm.* from relation_master as rm left join product_master as pm on pm.product_id = rm.product_id where rm.type='cat' and rm.type_id='27' and pm.product_status = 'publish' order by pm.product_push_to_top_date desc,product_id desc LIMIT 12040, 20