SQL is the backbone of the Google Data Analytics Certificate — and it's where most learners struggle the most. The good news: the SQL you need for the certificate is well-defined. This guide covers every concept you'll encounter, with practice queries you can run yourself and clear explanations of the things that trip people up.
SQL Concepts Tested in the GDA Certificate
The certificate focuses on core SQL operations rather than advanced database theory. Here are the key areas:
SELECT and filtering: SELECT, FROM, WHERE, AND/OR, BETWEEN, LIKE, IS NULL / IS NOT NULL
Sorting and limiting: ORDER BY (ASC/DESC), LIMIT
Aggregations: COUNT(), SUM(), AVG(), MIN(), MAX(), GROUP BY, HAVING
Joins: INNER JOIN, LEFT JOIN, RIGHT JOIN (basic understanding)
Subqueries: Basic nested SELECT statements
Data manipulation: DISTINCT, TRIM(), LENGTH(), UPPER()/LOWER(), CAST()
Practice: Basic SELECT Queries
Start with the fundamentals. Every SQL query begins with SELECT and FROM.
-- Select all columns from a table
SELECT * FROM sales_data;
-- Select specific columns
SELECT customer_id, order_total, order_date
FROM sales_data;
-- Filter with WHERE
SELECT * FROM sales_data
WHERE order_total > 100;
-- Filter with multiple conditions
SELECT * FROM sales_data
WHERE order_total > 100
AND region = 'North';
Practice: Aggregations and GROUP BY
Aggregation queries are heavily tested. Know how to combine GROUP BY with aggregate functions and when to use HAVING vs. WHERE.
-- Count orders per region
SELECT region, COUNT(*) AS order_count
FROM sales_data
GROUP BY region;
-- Sum of sales per product category
SELECT category, SUM(revenue) AS total_revenue
FROM sales_data
GROUP BY category
ORDER BY total_revenue DESC;
-- HAVING: filter after aggregation
SELECT region, AVG(order_total) AS avg_order
FROM sales_data
GROUP BY region
HAVING AVG(order_total) > 75;
Remember: WHERE filters rows before aggregation. HAVING filters groups after aggregation. This distinction is a common exam question.
Practice: JOINs
The GDA certificate introduces INNER JOIN and LEFT JOIN. Understand conceptually what each returns.
-- INNER JOIN: only matching rows from both tables
SELECT o.order_id, c.customer_name, o.order_total
FROM orders o
INNER JOIN customers c ON o.customer_id = c.customer_id;
-- LEFT JOIN: all rows from left table, matching from right
SELECT c.customer_name, o.order_id
FROM customers c
LEFT JOIN orders o ON c.customer_id = o.customer_id;
Common SQL Mistakes to Avoid
The mistakes that cost students the most points: forgetting WHERE vs. HAVING, writing GROUP BY after WHERE but before ORDER BY, using COUNT(*) when COUNT(column_name) is needed to exclude NULLs, and aliases that don't carry through to HAVING clauses in some SQL dialects.
Practice these queries in BigQuery or SQLiteOnline.com until they feel instinctive, not calculated.