SELECT pct.wpc_id,pct.wpc_country_name,pdt.wps_id,pdt.wps_destination_name,pdt.wps_country_id FROM wp_property_country pct left join wp_property_destination pdt on pct.wpc_id=pdt.wps_country_id left join wp_property_table plt on pdt.wps_id=plt.wpt_state_id where pdt.wps_status = '1' and pct.wpc_continental_id= and FIND_IN_SET(199, plt.wpt_site_allowed_prefix) group by plt.wpt_state_id order by pct.wpc_country_name,pdt.wps_destination_name ASC