Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created February 23, 2012 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/1890380 to your computer and use it in GitHub Desktop.
Save willrjmarshall/1890380 to your computer and use it in GitHub Desktop.
SELECT "health_quotes".* FROM "health_quotes" INNER JOIN "view_health_products" ON "view_health_products"."id" = "health_quotes"."health_product_id" AND "view_health_products"."type" IN ('HealthProduct') INNER JOIN "view_health_products" "extra_health_products_health_quotes" ON "extra_health_products_health_quotes"."id" = "health_quotes"."extra_health_product_id" AND "extra_health_products_health_quotes"."type" IN ('HealthProduct') WHERE (view_health_products.product_type_code = '1'
SELECT "health_quotes".* FROM "health_quotes" INNER JOIN "view_health_products" ON "view_health_products"."id" = "health_quotes"."health_product_id" AND "view_health_products"."type" IN ('HealthProduct') INNER JOIN "view_health_products" "extra_health_products_health_quotes" ON "extra_health_products_health_quotes"."id" = "health_quotes"."extra_health_product_id" AND "extra_health_products_health_quotes"."type" IN ('HealthProduct') WHERE "view_health_products"."product_type_code" = 1
SELECT "health_quotes".* FROM "health_quotes" INNER JOIN "view_health_products" ON "view_health_products"."id" = "health_quotes"."health_product_id" AND "view_health_products"."type" IN ('HealthProduct') INNER JOIN "view_health_products" "extra_health_products_health_quotes" ON "extra_health_products_health_quotes"."id" = "health_quotes"."extra_health_product_id" AND "extra_health_products_health_quotes"."type" IN ('HealthProduct') WHERE ("view_health_products"."product_type_code" = 1)
@willrjmarshall
Copy link
Author

SELECT "health_quotes".* FROM "health_quotes" INNER JOIN "view_health_products" ON "view_health_products"."id" = "health_quotes"."health_product_id" AND "view_health_products"."type" IN ('HealthProduct') INNER JOIN "view_health_products" "extra_health_products_health_quotes" ON "extra_health_products_health_quotes"."id" = "health_quotes"."extra_health_product_id" AND "extra_health_products_health_quotes"."type" IN ('HealthProduct') WHERE ("view_health_products"."product_type_code" = 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment