Last active
August 29, 2015 14:05
-
-
Save sevenseacat/756c6d602376fdaf7d5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 "spree_products".* | |
| FROM "spree_products" | |
| INNER JOIN "spree_variants" ON "spree_variants"."product_id" = "spree_products"."id" | |
| AND "spree_variants"."is_master" = 't' | |
| AND "spree_variants"."deleted_at" IS NULL | |
| INNER JOIN "spree_prices" ON "spree_prices"."variant_id" = "spree_variants"."id" | |
| AND "spree_prices"."deleted_at" IS NULL | |
| WHERE "spree_products"."deleted_at" IS NULL | |
| AND ("spree_products".deleted_at IS NULL or "spree_products".deleted_at >= '2014-09-01 07:57:37.112639') | |
| AND ("spree_products".available_on <= '2014-09-01 07:57:37.113857') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment