An Avito interview question tests whether candidates understand that applying DISTINCT to an already grouped result often changes nothing. Using the data in the events table, determine how many rows the following query returns:
SELECT DISTINCT a, b, c, SUM(d) AS revenue
FROM events
GROUP BY a, b, c
Wrap this query in another query and return the row count in a single column named rows_returned.