SQL practice / Google
Free SQL interview practice

Google SQL interview questions. All free.

16 SQL practice questions in our Google collection, part of our 188-question bank across 23 companies. Write SQL against practice datasets and get checked in your browser. Free, no card or trial.

No account needed to start. Draft SQL stays in this browser; create an account to sync solved history.

4 Easy · 7 Medium · 5 Hard

Independent practice resource. Not affiliated with or endorsed by Google.

Inside the Google set

SQL topics you can practice.

These topics come from the questions in this set. Pick one to open the matching problems.

Easy · 8 min

Email Sender Analysis with Counts

Find the top 10 external email senders (not @google.com) who sent the most messages to Google employees (@google.com) in the last 30 days. Return sender_email and message_count, sorted by message_count descending (break count ties alphabetically by sender_email).

Tables: gmail_messages
Medium · 12 min

User Activity Ranking by Date

For each user and date, rank days by event_count where the highest count gets rank 1. If two days have the same event count, they get the same rank and the next rank is not skipped (use DENSE_RANK). Return user_id, event_date, event_count, and rank.

Tables: user_events
Hard · 15 min

Search Query Session Analysis

A search session is defined as a sequence of queries from the same user within 15 minutes of each other. If more than 15 minutes pass between queries, a new session starts. Calculate the average number of queries per session for each user. Return user_id and avg_queries_per_session.

Tables: search_events
How it works

Solve in the browser. Checked instantly.

  1. 1
    Pick a problemPractice questions for data science and analytics interviews, each with its own tables, difficulty, and time target.
  2. 2
    Write and run SQLA full database engine loads in the tab. No setup, nothing to install — query the practice dataset immediately.
  3. 3
    Submit for a verdictPass and move to the next problem. Miss and you unlock the expected output and a reference solution.
User Activity Ranking by DateGoogle

Your dataset

user_events

user_id (BIGINT) · event_date (DATE) · event_count (BIGINT)

Try this Google question
16
Google questions
188
questions in the full bank
$0
free access

Solve one now. Build your solved history.

Start free, no account needed. When you create one, everything you’ve solved comes with you — solved marks, streaks, and concept ratings on your dashboard.

Practice Google SQL free

Create a free account to sync solved history →