Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select distinct p.product_id, p.product_name
- from sales_fact sf join product p on sf.product_id=p.product_id join time_by_day t on sf.time_id=t.time_id join store st on sf.store_id=st.store_id join promotion pr on pr.promotion_id=sf.promotion_id
- where t.the_year= 1997 and sf.store_sales>15.00 and sf.product_id in
- (select sf.product_id
- from sales_fact sf join product p on sf.product_id=p.product_id join time_by_day t on sf.time_id=t.time_id join store st on sf.store_id=st.store_id join promotion pr on pr.promotion_id=sf.promotion_id
- where t.the_year=1998 and pr.promotion_name='Price Winners'and sf.store_sales>10.00)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement