Google marketing analysts are tracking the efficiency of lead generation across different products. Sometimes, the same lead or partner might be recorded multiple times for the same product on a single day due to different interaction touchpoints.
Your task is to write an SQL query that returns the number of unique leads and unique partners for each date and each product.
Rules:
- Return the result table containing date_id, make_name, unique_leads, and unique_partners.
- unique_leads is the count of distinct lead_id values.
- unique_partners is the count of distinct partner_id values.
- The results must be returned in descending order by date_id. If dates are the same, sort by make_name in ascending order.