Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Customers_who_Bought_All_Products.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
select customer_id from customer group by customer_id
having count(distinct product_key) = (select count(*) from product)
2 changes: 2 additions & 0 deletions Product_Sales_Analysis_III.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
with cte as (select product_id,year,quantity,price, rank() over(partition by product_id order by year) as rnk from sales)
select product_id, year as first_year, quantity, price from cte where rnk = 1;