Skip to content

Instantly share code, notes, and snippets.

@kokosing
Created March 29, 2016 07:31
Show Gist options
  • Save kokosing/f797f59f0c029348d56e to your computer and use it in GitHub Desktop.
Save kokosing/f797f59f0c029348d56e to your computer and use it in GitHub Desktop.
*** q12.sql 2016-03-25 14:10:21.906553746 +0100
--- q12_modified.sql 2016-03-25 14:10:21.906553746 +0100
***************
*** 10,20 ****
 WHERE ws_item_sk = i_item_sk
 AND i_category IN ('Men',
 'Music',
 'Women')
 AND ws_sold_date_sk = d_date_sk
! AND d_date BETWEEN cast('2000-01-21' AS date) AND (cast('2000-01-21' AS date) + 30 days)
 GROUP BY i_item_id,
 i_item_desc,
 i_category,
 i_class,
 i_current_price
--- 10,20 ----
 WHERE ws_item_sk = i_item_sk
 AND i_category IN ('Men',
 'Music',
 'Women')
 AND ws_sold_date_sk = d_date_sk
! AND d_date BETWEEN cast('2000-01-21' AS date) AND (cast('2000-01-21' 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