Tesla Interview Question

Write a SQL query that includes grouping, ordering and counting logic.