Pivot revenue per billing country across days of the week — useful for spotting weekend-heavy markets.
| Column | Type |
|---|---|
| InvoiceId | INTEGER (PK) |
| CustomerId | INTEGER (FK) |
| InvoiceDate | TIMESTAMP NOT NULL |
| BillingCountry | TEXT |
| Total | NUMERIC(10,2) NOT NULL |
BillingCountry, produce 7 columns: Sun, Mon, Tue, Wed, Thu, Fri, Sat — each the rounded sum of Total for invoices on that weekdayTotalRevenue (rounded), WeekendShare = (Sun + Sat) / TotalRevenue × 100, rounded to 2Ready to take your skills to the next level? Enroll in our comprehensive Data Analyst Career Track to master SQL, Python, Excel, and Power BI.
Run your code to see the result here.