Skip to content

Instantly share code, notes, and snippets.

@kokosing
Created March 29, 2016 07:36
Show Gist options
  • Save kokosing/9425c545455e2c9bef7d to your computer and use it in GitHub Desktop.
Save kokosing/9425c545455e2c9bef7d to your computer and use it in GitHub Desktop.
*** q20.sql 2016-03-25 14:10:21.906553746 +0100
--- q20_modified.sql 2016-03-25 14:10:21.906553746 +0100
***************
*** 10,20 ****
WHERE cs_item_sk = i_item_sk
AND i_category IN ('Women',
'Jewelry',
'Sports')
AND cs_sold_date_sk = d_date_sk
! AND d_date BETWEEN cast('2002-06-20' AS date) AND (cast('2002-06-20' AS date) + 30 days)
GROUP BY i_item_id,
i_item_desc,
i_category,
i_class,
i_current_price
--- 10,20 ----
WHERE cs_item_sk = i_item_sk
AND i_category IN ('Women',
'Jewelry',
'Sports')
AND cs_sold_date_sk = d_date_sk
! AND d_date BETWEEN cast('2002-06-20' AS date) AND (cast('2002-06-20' AS date) + INTERVAL '30' DAY)
GROUP BY i_item_id,
i_item_desc,
i_category,
i_class,
i_current_price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment