• Skip to primary navigation
  • Skip to content
  • Skip to footer
Just Do IT!
  • Posts
  • Categories
  • Tags

    LeeDayday

    I am an amazing person.

    • Somewhere

    [Leetcode] Daily Leads and Partners

    최대 1 분 소요

    문제 링크

    정답

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

    ✅ Point

    • COUNT(lead_id) 만으론 distinct 한 id의 개수를 구할 수 없음
    • COUNT(DISTINCT lead_id) 로

    태그: leetcode, sql

    카테고리: sql

    업데이트: July 29, 2025

    공유하기

    Twitter Facebook LinkedIn
    이전 다음

    참고

    [Leetcode] Analyze Subscription Conversion

    1 분 소요

    문제 링크

    [Leetcode] Find Products with Valid Serial Numbers

    최대 1 분 소요

    문제 링크

    [Leetcode] Find Students Who Improved

    최대 1 분 소요

    문제 링크

    [Leetcode] Employees With Missing Information

    최대 1 분 소요

    문제 링크

    • 팔로우:
    • 피드
    © 2025 LeeDayday. Powered by Jekyll & Minimal Mistakes.