Created
May 25, 2012 21:57
-
-
Save xenda/2790825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(*) FROM `products` INNER JOIN `product_variants` ON `product_variants`.`product_id` = products.`id` INNER JOIN `stores` ON `stores`.`id` = products.`store_id` WHERE ((stores.ruc_rus IS NOT NULL and stores.ruc_rus != '') AND (stores.trade_name IS NOT NULL and stores.trade_name != '') AND (stores.cci IS NOT NULL and stores.cci != '') AND (stores.warranty_policies IS NOT NULL and stores.warranty_policies != '')) HAVING ((select count(*) from product_variants join products on product_variants.product_id = products.id where `product_variants`.product_id = products.id) > 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment