1
2
3
4
5
100

What does NULL represent in a database?

Unknown or missing data

100

Is NULL equal to 0 or empty string?

No

100

Which keyword is used to check NULL values?

IS NULL / IS NOT NULL

100

Do aggregate functions include NULL values?

No, they ignore NULL

100

COALESCE return?

The first non-NULL value

200

What happens when you compare NULL with any value?

Result is NULL (unknown)

200

What is the purpose of COALESCE in queries?

To replace NULL with default value

200

What does the CASE expression do?

Adds if-then-else logic in SQL

200

In CASE, which condition is applied if multiple are true?

The first matching condition

200

What is a CTE (Common Table Expression)?

A temporary result set used in a query

300

Why are CTEs useful? Name one reason.

Readability / Reusability / Debugging

300

What keyword defines a CTE?

WITH

300

bonus 

+500

300

You can steal 300 points from the other team.

300

300

Difference between GROUP BY and window functions?

GROUP BY collapses rows, window functions keep them

400

bomb

-400

400

What happens to numbering in ROW_NUMBER() with PARTITION BY?

It restarts for each partition

400

Difference between RANK() and DENSE_RANK()?

RANK skips numbers, DENSE_RANK does not

400

What does LAG() function do?

Gets value from previous row

400

What does LEAD() function do?

Gets value from next row

500

What is conditional aggregation?

Using CASE inside aggregate functions

500

Why is ORDER BY important in LAG/LEAD?

It defines row order

500

What happens if OVER() is empty?

Applies to entire result set

500

Can multiple CTEs be used in one query?

Yes, separated by commas

500

Why are window functions powerful?

They analyze data without losing individual rows

M
e
n
u