Daily Search Volume
How many search queries were submitted on each day?
- Aggregation
- Date analysis
- Sorting
Challenge brief
Understand the request
Search Operations is monitoring search load day by day to detect traffic spikes and plan infrastructure capacity.
Return search_date, total_searches in the declared deterministic order.
Return
- search_date
- total_searches
Constraints
- Return one row per search date
- Order chronologically
Data you will use
Review the relevant tables before deciding how to join, filter, or aggregate them.
search_queries
query_idINTEGERuser_idINTEGERquery_textVARCHAR(200)search_dateDATE
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
Each search row contributes to one calendar date.
Hint 2
Aggregate search rows at date grain.
Hint 3
Sort the daily series chronologically.
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT search_date, COUNT(*) AS total_searches FROM search_queries GROUP BY search_date ORDER BY search_dateWhy this works
Each row in search_queries is one query. COUNT(*) per search_date gives the daily volume. Jan 15 has 3 queries (from users 7, 8, and 17). Jan 5 has only 1 (user 15 searching samba music).
Success check
Returns the complete deterministic result for daily search volume
Expected result
Use this output to verify values, aliases, ordering, and row count.
| search_date | total_searches |
|---|---|
| 2024-01-05 | 1 |
| 2024-01-10 | 2 |
| 2024-01-11 | 1 |
| 2024-01-12 | 2 |
| 2024-01-13 | 1 |
| 2024-01-14 | 2 |
| 2024-01-15 | 3 |
| 2024-01-16 | 2 |
| 2024-01-17 | 2 |
| 2024-01-18 | 2 |
Previewing 10 of 22 expected rows. Run the query in the editor to inspect the full result.
Learn the concepts behind this answer
Strengthen your understanding with these targeted learning topics:
Continue practicing
Explore related company challenges
Meta
Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.
Microsoft
Independent Microsoft-style cloud, productivity, subscription, usage, support, and customer analytics SQL practice.
Netflix
Independent Netflix-style streaming, subscription, catalog, ratings, and engagement SQL practice.
Return to the complete interview preparation experience.