Power Tools
results
SELECT SQL_CALC_FOUND_ROWS tw_posts.ID FROM tw_posts LEFT JOIN tw_term_relationships ON (tw_posts.ID = tw_term_relationships.object_id) LEFT JOIN tw_posts AS p2 ON (tw_posts.post_parent = p2.ID) LEFT JOIN tw_wc_product_meta_lookup wc_product_meta_lookup ON tw_posts.ID = wc_product_meta_lookup.product_id WHERE 1=1 AND ( tw_posts.ID NOT IN ( SELECT object_id FROM tw_term_relationships WHERE term_taxonomy_id IN (42,44) ) AND tw_term_relationships.term_taxonomy_id IN (2459,2207) ) AND tw_posts.post_type = 'product' AND (((tw_posts.post_status = 'publish') OR (tw_posts.post_status = 'inherit' AND (p2.post_status = 'publish')))) GROUP BY tw_posts.ID ORDER BY wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC LIMIT 0, 15kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
results