Skip to content

SQL Count all null values as distinct [closed]

I need to write a query that tells me how many(COUNT) unique customers made a purchase of over $200. My table has a customer_id, purchase_id, and total. purchase_id is unique for every row. …

Cumulative calculation using SQL

I have a supply and a demand table as shown below, Supply Center1 1-Sep 500 Center1 1-Dec 1000 Demand Center1 Req-1 1-Aug 300 Center1 Req-2 15-Aug 250 Center1 Req-3 1-Sep 1100 write …