T TestsWorld

SQL Test (MySQL & PostgreSQL)

Developer Skills

About this practice test

This SQL practice test covers the queries and concepts that come up most often in SQL rounds of hiring tests and technical interviews. Questions use standard SQL, with notes where MySQL or PostgreSQL behave differently.

What it covers

  • SELECT, WHERE, operators and NULL handling; ORDER BY, LIMIT and DISTINCT
  • Aggregates, GROUP BY and HAVING; inner, outer, self and cross joins
  • Subqueries, EXISTS and IN; UNION, INTERSECT and EXCEPT
  • Window functions (ROW_NUMBER, RANK, DENSE_RANK, LAG/LEAD, running totals) and CTEs, including recursive CTEs
  • DDL, constraints and keys; INSERT, UPDATE, DELETE and upserts
  • Indexes and EXPLAIN, transactions, ACID and isolation levels, normalization, views and triggers

Who it is for

Freshers and early-career developers and data analysts preparing for SQL rounds, online assessments and interviews.

Format

200 multiple-choice questions mixing query-output questions on small sample tables with concept questions. Each question shows a short explanation after you answer, including the common trap where there is one.

Free to attempt with a TestsWorld account. No card required.

Advertisement