LearnFrenzy
Sign in Take a free test

Technical tests

DBMS & SQL Online Test

Query-result and query-writing questions run on real tables, plus normalization, transactions and indexing.

Topics
10
Practice sets
30
Full mocks
2
Questions
450

SQL is asked in almost every software, data and backend interview, and DBMS theory is a core GATE CSE subject. These tests mix query-result questions, "which query is correct" questions and concept questions. Every SQL answer on this page was produced by running the query on the tables shown with it.

Full mocks

Test yourself like the real round

DBMS & SQL · Full Mock 1

35 questions in two timed sections – executed SQL and DBMS theory – with negative marking, in the style of a technical round.

  • 35 questions
  • 45 min
  • 2 sections
  • −0.25 per wrong answer

DBMS & SQL · Full Mock 2

35 fresh questions – no overlap with Mock 1 – covering NULL traps, window functions, puzzles, normal forms, isolation and indexing.

  • 35 questions
  • 45 min
  • 2 sections
  • −0.25 per wrong answer

Topic-wise practice

Choose a topic and level

01DBMS and SQL Fundamentals

DBMS concepts, SQL command families, filtering and sorting, NULL and three-valued logic, CASE, functions and basic DML.

  • Beginner DBMS & SQL Basics · Beginner15 questions · 23 min Not started Start
  • Intermediate DBMS & SQL Basics · Intermediate15 questions · 23 min Not started Start
  • Advanced DBMS & SQL Basics · Advanced15 questions · 23 min Not started Start

02Joins and Subqueries

INNER, LEFT, RIGHT, self and cross joins, NULL traps, NOT IN vs NOT EXISTS and correlated subqueries.

  • Beginner SQL Joins · Beginner15 questions · 23 min Not started Start
  • Intermediate SQL Joins · Intermediate15 questions · 23 min Not started Start
  • Advanced SQL Joins · Advanced15 questions · 23 min Not started Start

03Aggregates and GROUP BY

COUNT, SUM, AVG, MIN and MAX with NULLs, GROUP BY and HAVING, conditional aggregation and ROLLUP.

  • Beginner GROUP BY & Aggregates · Beginner15 questions · 23 min Not started Start
  • Intermediate GROUP BY & Aggregates · Intermediate15 questions · 23 min Not started Start
  • Advanced GROUP BY & Aggregates · Advanced15 questions · 23 min Not started Start

04Window Functions

ROW_NUMBER, RANK, DENSE_RANK, NTILE, LAG and LEAD, running totals, frames, top-N per group and gaps and islands.

  • Beginner Window Functions · Beginner15 questions · 23 min Not started Start
  • Intermediate Window Functions · Intermediate15 questions · 23 min Not started Start
  • Advanced Window Functions · Advanced15 questions · 23 min Not started Start

05Keys and Constraints

Primary, candidate, super, foreign and composite keys, NOT NULL, UNIQUE, CHECK and DEFAULT, referential actions and key closures.

  • Beginner Keys & Constraints · Beginner15 questions · 23 min Not started Start
  • Intermediate Keys & Constraints · Intermediate15 questions · 23 min Not started Start
  • Advanced Keys & Constraints · Advanced15 questions · 23 min Not started Start

06ER Model and Relational Mapping

Entities, attributes, weak entities, cardinality and participation, specialisation, and turning an ER diagram into tables.

  • Beginner ER Model · Beginner15 questions · 23 min Not started Start
  • Intermediate ER Model · Intermediate15 questions · 23 min Not started Start
  • Advanced ER Model · Advanced15 questions · 23 min Not started Start

07Normalization

Functional dependencies, anomalies, 1NF to BCNF, 4NF, lossless and dependency-preserving decomposition, and minimal cover.

  • Beginner Normalization · Beginner15 questions · 23 min Not started Start
  • Intermediate Normalization · Intermediate15 questions · 23 min Not started Start
  • Advanced Normalization · Advanced15 questions · 23 min Not started Start

08Transactions and Concurrency

ACID, COMMIT and ROLLBACK, savepoints, isolation levels and read anomalies, serializability, locking, deadlocks and recovery.

  • Beginner Transactions · Beginner15 questions · 23 min Not started Start
  • Intermediate Transactions · Intermediate15 questions · 23 min Not started Start
  • Advanced Transactions · Advanced15 questions · 23 min Not started Start

09Indexing and Query Optimisation

B+ tree indexes, clustered and secondary indexes, composite and covering indexes, when indexes are ignored, EXPLAIN, and GATE index arithmetic.

  • Beginner Indexing · Beginner15 questions · 23 min Not started Start
  • Intermediate Indexing · Intermediate15 questions · 23 min Not started Start
  • Advanced Indexing · Advanced15 questions · 23 min Not started Start

10Advanced SQL Queries

Subqueries, CTEs and recursive CTEs, UNION/INTERSECT/EXCEPT, pivots, Nth-highest and duplicate puzzles, multi-table DML, views and triggers.

  • Beginner Advanced SQL · Beginner15 questions · 23 min Not started Start
  • Intermediate Advanced SQL · Intermediate15 questions · 23 min Not started Start
  • Advanced Advanced SQL · Advanced15 questions · 23 min Not started Start

Search LearnFrenzy

Esc

Quick links