Q1
What does it mean for a SQL query to use a window function?
hardCorrect Answer: It performs a calculation across a set of rows related to the current row without collapsing them into a single result, unlike GROUP BY
Explanation:
Window functions such as ROW_NUMBER or RANK let you compute running totals or rankings while still returning one row per original row, which is different from GROUP BY, which reduces multiple rows into one summary row per group.