Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed12163

Browse files
authoredDec 20, 2020
Create daily-leads-and-partners.sql
1 parent e37a16c commit ed12163

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎MySQL/daily-leads-and-partners.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Time: O(n)
2+
# Space: O(n)
3+
4+
SELECT date_id,
5+
make_name,
6+
COUNT(DISTINCT lead_id) AS unique_leads,
7+
COUNT(DISTINCT partner_id) AS unique_partners
8+
FROM DailySales
9+
GROUP BY 1, 2
10+
ORDER BY NULL;

0 commit comments

Comments
 (0)
Please sign in to comment.