What does the FIRST_VALUE(revenue) OVER (PARTITION BY region ORDER BY sale_date) return? SQL Data AnalystMedium Try Now
What does a SCD Type 2 (Slowly Changing Dimension) do to preserve history? SQL Data AnalystMedium Try Now
How does a star schema differ from a snowflake schema in data warehousing? SQL Data AnalystMedium Try Now
What does the following query calculate? SELECT product, sales / SUM(sales) OVER () * 100 AS pct FROM sales_table SQL Data AnalystMedium Try Now
What is the difference between ROWS BETWEEN and RANGE BETWEEN in window frame clauses? SQL Data AnalystMedium Try Now
What does the LEAD(revenue, 1) OVER (ORDER BY month) window function return? SQL Data AnalystMedium Try Now
What does PERCENT_RANK() return for the first row in a partition ordered by salary? SQL Data AnalystMedium Try Now
What is the difference between a correlated subquery and a non-correlated subquery? SQL Data AnalystMedium Try Now
What does GROUP BY ROLLUP(dept, role) produce compared to a plain GROUP BY? SQL Data AnalystMedium Try Now
In a LEFT JOIN anti-join pattern, what does adding WHERE right_table.id IS NULL accomplish? SQL Data AnalystMedium Try Now
What does CASE WHEN salary > 100000 THEN ‘Senior’ ELSE ‘Junior’ END return? SQL Data AnalystMedium Try Now
What does LAG(revenue, 1) OVER (ORDER BY month) return for the first row? SQL Data AnalystMedium Try Now
What is a CTE (Common Table Expression) and what advantage does it provide? SQL Data AnalystMedium Try Now