SELECT SQL_CALC_FOUND_ROWS wlp.category_id,
wlp.product_name, wlp.youtube_id, wlp.product_code,
wlp.product_price, wlp.unit_measurement, wlp.moq,
wlp.products_description, wlp.attribute_name,
wlp.attribute_value, wlp.friendly_url, wlp.productType,
wlp.products_id, wlp.customers_id,
wlp.product_discounted_price, wlp.unit_value,
wlp.products_viewed, wlpm.media, wlpm.media_type,
wlpm.is_default, c.status as companyStatus, c.city,
c.state FROM (`wps_products` as wlp) LEFT JOIN
`wps_products_media` AS wlpm ON
`wlp`.`products_id`=`wlpm`.`products_id` LEFT JOIN
`wps_customers` AS c ON
`wlp`.`customers_id`=`c`.`customers_id` LEFT JOIN
`wps_customers_factsheet` AS cf ON
`wlp`.`customers_id`=`cf`.`customers_id` WHERE
`wlp`.`productType` = '1' AND
FIND_IN_SET('42',wlp.category_links) AND category_id!='' AND
`wlp`.`status` = '1' AND (c.city = '507') AND
`wlp`.`status` != '2' AND `c`.`status` = '1' GROUP BY
`wlp`.`customers_id` ORDER BY `wlpm`.`products_id`
desc LIMIT 10