Mock Quiz Hub

Mock Quiz Hub

Recent Updates
Added: OS Mid 1 Quiz
Added: OS Mid 2 Quiz
Added: OS Lab 1 Quiz
Time: 00:00

Quiz

Navigate through questions using the controls below

0%
Question 1 of 60 Quiz ID: 1
Which SQL standard was the first to be formally adopted by ANSI and ISO?
Question 2 of 60 Quiz ID: 2
What is the key difference between CHAR(n) and VARCHAR(n) data types?
Question 3 of 60 Quiz ID: 3
What happens when you declare an attribute as PRIMARY KEY in a CREATE TABLE statement?
Question 4 of 60 Quiz ID: 4
What is the difference between DROP TABLE and DELETE FROM statements?
Question 5 of 60 Quiz ID: 5
In the basic SQL query structure SELECT A1, A2 FROM r1, r2 WHERE P, what does the WHERE clause correspond to in relational algebra?
Question 6 of 60 Quiz ID: 6
When would you use the DISTINCT keyword in a SELECT clause?
Question 7 of 60 Quiz ID: 7
What does the asterisk (*) represent in a SELECT clause?
Question 8 of 60 Quiz ID: 8
In the FROM clause, what operation does listing multiple relations correspond to in relational algebra?
Question 9 of 60 Quiz ID: 9
What is the primary purpose of the WHERE clause in an SQL query?
Question 10 of 60 Quiz ID: 10
What is the main risk when using NATURAL JOIN?
Question 11 of 60 Quiz ID: 11
What is the purpose of the AS clause in SQL?
Question 12 of 60 Quiz ID: 12
How does the ORDER BY clause sort results by default?
Question 13 of 60 Quiz ID: 13
What does the LIKE operator with pattern '%dar%' match?
Question 14 of 60 Quiz ID: 14
What is the purpose of the BETWEEN operator in SQL?
Question 15 of 60 Quiz ID: 15
Which aggregate function calculates the average value of a numeric column?
Question 16 of 60 Quiz ID: 16
What does COUNT(*) aggregate function do?
Question 17 of 60 Quiz ID: 17
When must attributes appear in the GROUP BY clause?
Question 18 of 60 Quiz ID: 18
What is the key difference between WHERE and HAVING clauses?
Question 19 of 60 Quiz ID: 19
How do aggregate functions typically handle NULL values?
Question 20 of 60 Quiz ID: 20
What is a nested subquery in SQL?
Question 21 of 60 Quiz ID: 21
Which SQL data type would be most appropriate for storing a product price with exactly 2 decimal places?
Question 22 of 60 Quiz ID: 22
What is the practical difference between DROP TABLE and ALTER TABLE DROP?
Question 23 of 60 Quiz ID: 23
In a practical scenario, when would you use SELECT DISTINCT?
Question 24 of 60 Quiz ID: 24
Why might you use arithmetic expressions in the SELECT clause?
Question 25 of 60 Quiz ID: 25
In a real-world database, why would you use table aliases with the AS clause?
Question 26 of 60 Quiz ID: 26
When would you use the ORDER BY clause in a practical application?
Question 27 of 60 Quiz ID: 27
In what practical situation would you use the LIKE operator with pattern matching?
Question 28 of 60 Quiz ID: 28
Why would you use the BETWEEN operator instead of multiple AND conditions?
Question 29 of 60 Quiz ID: 29
In a sales database, which aggregate function would you use to find the total revenue?
Question 30 of 60 Quiz ID: 30
When would you use GROUP BY in a practical business scenario?
Question 31 of 60 Quiz ID: 31
In what scenario would you use HAVING instead of WHERE?
Question 32 of 60 Quiz ID: 32
Why might you use nested subqueries in a real application?
Question 33 of 60 Quiz ID: 33
What is a practical use of foreign key constraints?
Question 34 of 60 Quiz ID: 34
In a customer orders database, which query would find customers from 'Moratuwa'?
Question 35 of 60 Quiz ID: 35
How would you find employees who earn more than their department's average salary?
Question 36 of 60 Quiz ID: 36
Which query would list projects with budgets over 1,000,000?
Question 37 of 60 Quiz ID: 37
How would you find the number of employees in each city?
Question 38 of 60 Quiz ID: 38
What query would find the highest salary in each department?
Question 39 of 60 Quiz ID: 39
How would you find employees who work on projects located in their home city?
Question 40 of 60 Quiz ID: 40
Which query would update salaries by giving a 10% raise to all employees?
Question 41 of 60 Quiz ID: 41
How would you find the total hours worked on each project?
Question 42 of 60 Quiz ID: 42
What is the practical purpose of the NOT NULL constraint?
Question 43 of 60 Quiz ID: 43
In an e-commerce database, how would you find products that have never been ordered?
Question 44 of 60 Quiz ID: 44
Which SQL operation would you use to combine customer names with their order dates?
Question 45 of 60 Quiz ID: 45
How would you find the most expensive product in each category?
Question 46 of 60 Quiz ID: 46
What is a practical use of the DISTINCT keyword with COUNT()?
Question 47 of 60 Quiz ID: 47
How would you find employees who have the same salary as their manager?
Question 48 of 60 Quiz ID: 48
Which query would delete all orders older than 5 years?
Question 49 of 60 Quiz ID: 49
How would you find the average order value for each customer?
Question 50 of 60 Quiz ID: 50
What is the practical purpose of using transactions with SQL statements?
Question 51 of 60 Quiz ID: 51
How would you find products that are priced above the average price of all products?
Question 52 of 60 Quiz ID: 52
Which SQL feature would you use to ensure email addresses are unique across users?
Question 53 of 60 Quiz ID: 53
How would you find the top 3 highest-paid employees?
Question 54 of 60 Quiz ID: 54
What is a practical use of the COALESCE function?
Question 55 of 60 Quiz ID: 55
How would you update product prices by applying a 15% discount to discontinued items?
Question 56 of 60 Quiz ID: 56
Which query would find customers who have placed more than 5 orders?
Question 57 of 60 Quiz ID: 57
How would you calculate the total sales for the current month?
Question 58 of 60 Quiz ID: 58
What is the practical purpose of database indexes?
Question 59 of 60 Quiz ID: 59
How would you find employees who were hired in the last 30 days?
Question 60 of 60 Quiz ID: 60
Why would you use SQL views in a practical application?

Quiz Summary

Review your answers before submitting

60
Total Questions
0
Answered
60
Remaining
00:00
Time Spent