Skip to content

Instantly share code, notes, and snippets.

@kokosing
Created March 29, 2016 07:31
Show Gist options
  • Save kokosing/b2641545fa82e9f14fff to your computer and use it in GitHub Desktop.
Save kokosing/b2641545fa82e9f14fff to your computer and use it in GitHub Desktop.
*** q37.sql 2016-03-25 14:10:21.906553746 +0100
--- q37_modified.sql 2016-03-25 14:10:21.906553746 +0100
***************
*** 6,16 ****
 "${database}"."${schema}".date_dim,
 "${database}"."${schema}".catalog_sales
 WHERE i_current_price BETWEEN 11 AND 11 + 30
 AND inv_item_sk = i_item_sk
 AND d_date_sk=inv_date_sk
! AND d_date BETWEEN cast('1998-01-05' AS date) AND (cast('1998-01-05' AS date) + 60 days)
 AND i_manufact_id IN (859,
 830,
 805,
 765)
 AND inv_quantity_on_hand BETWEEN 100 AND 500
--- 6,16 ----
 "${database}"."${schema}".date_dim,
 "${database}"."${schema}".catalog_sales
 WHERE i_current_price BETWEEN 11 AND 11 + 30
 AND inv_item_sk = i_item_sk
 AND d_date_sk=inv_date_sk
! AND d_date BETWEEN cast('1998-01-05' AS date) AND (cast('1998-01-05' AS date) + INTERVAL '60' DAY)
 AND i_manufact_id IN (859,
 830,
 805,
 765)
 AND inv_quantity_on_hand BETWEEN 100 AND 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment