A product health audit needs to detect dormant accounts that registered on the search platform but never initiated a single search query. Write a SQL query using a LEFT JOIN to find the `user_id` and `country` of all registered users with zero recorded queries. Sort the results by `user_id` ascending. Edge cases tested: Some users may have logged searches where the `query_text` string was empty or NULL (e.g. accidental blank submissions). If a search record exists for a user, they are NOT a zero-search user. Only users with zero entries in the search history table should be returned.
Loading…
Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.
Ask questions, share alternate queries, and explore solutions
Your recent query executions and answer checks
This will insert the verified MySQL solution into your editor so you can study how each clause transforms the table.