SQL Online Assessment Questions & Answers
40 questions for the online assessment stage — 18 easy, 21 medium, 1 hard.
About the online assessment round
Most companies start with an online test: aptitude and reasoning, a few MCQs on core SQL concepts, and one or two short hands-on tasks. It filters a large number of applicants, so speed and accuracy both count.
Tips for the online assessment round
- Practise under a timer: about one minute per MCQ and 15-20 minutes per hands-on task.
- Read every option before answering; tests often include two nearly correct choices.
- Use a stable internet connection, keep your camera on and avoid switching tabs in proctored tests.
- Attempt the questions you are sure about first, then return to the harder ones.
What are FIRST_VALUE, LAST_VALUE and NTH_VALUE?
Show answer
Assign each customer to a spending quartile.
Show answer
Write SQL to create a students table with a primary key and constraints.
Show answer
Add a foreign key and a check constraint to an existing table.
Show answer
You need customers who bought both product A and product B. How would you write it?
Show answer
Design tables for students, courses and enrolments.
Show answer
Find employees earning more than the company average.
Show answer
Find employees who earn more than their department average.
Show answer
What are ROLLUP, CUBE and GROUPING SETS?
Show answer
What is a composite index and why does column order matter?
Show answer
What is the difference between a unique index and a normal index?
Show answer
What are database statistics and why do they matter?
Show answer
Write a query to pivot order counts by status into columns.
Show answer
What are ACID properties?
Show answer
What is the difference between GROUP BY and window functions?
Show answer
Explain 1NF, 2NF and 3NF with simple examples.
Show answer
A reporting team wants to query the production OLTP database directly. What are the risks and alternatives?
Show answer
What is the difference between IN and EXISTS?
Show answer
What is a window frame and what is the default frame?
Show answer
Your NOT IN query returns zero rows even though you expect results. What do you check?
Show answer
How do databases execute GROUP BY internally?
Show answer
Rewrite a non-SARGable date filter to use an index.
Show answer
What are the common SQL data types?
Show answer
Average order value looks too low in a report. What could be wrong?
Show answer
Find cities with more than 100 customers.
Show answer
What is a self join? Give an example.
Show answer
What is an index in a database?
Show answer
What is GROUP BY and what is the rule for selected columns?
Show answer
Write a query to list orders with customer names.
Show answer
What is a covering index?
Show answer
What are LAG and LEAD functions?
Show answer
What is normalisation and why is it needed?
Show answer
What are constraints in SQL?
Show answer
A query with a correlated subquery in SELECT runs for every row and is slow. How do you improve it?
Show answer
How do you insert, update and delete a row?
Show answer
Write a query to show each employee with their manager's name.
Show answer
How does AVG treat NULL values?
Show answer
What is the difference between a correlated and a non-correlated subquery?
Show answer
What is a star schema and a snowflake schema?
Show answer
Frequently asked questions
What happens in the SQL online assessment round?
Most companies start with an online test: aptitude and reasoning, a few MCQs on core SQL concepts, and one or two short hands-on tasks. It filters a large number of applicants, so speed and accuracy both count.
How do I clear the online assessment round?
Practise under a timer: about one minute per MCQ and 15-20 minutes per hands-on task. Read every option before answering; tests often include two nearly correct choices. Use a stable internet connection, keep your camera on and avoid switching tabs in proctored tests.
Which round comes next?
A typical order is online assessment, telephonic screening, one or two technical rounds, a managerial round and HR. Use the other round pages to practise each stage.