LeetCode solutions

1837. Daily Leads and Partners

My accepted SQL solution to LeetCode problem 1837, Daily Leads and Partners, running in 462ms.

  • Difficulty: Easy
  • SQL
  • Runtime 462ms
  • Memory 0.0B

Read the problem on LeetCode View on GitHub

SQL

Accepted on LeetCode — runtime 462ms, memory 0.0B, accepted 2025-12-31.

sql
SELECT date_id, make_name, 
       COUNT(DISTINCT lead_id) AS unique_leads,
       COUNT(DISTINCT partner_id) AS unique_partners
FROM DailySales
GROUP BY date_id, make_name

Source