An analyst wants to calculate the percentage each product’s sales contribute to total sales. Which SQL pattern correctly does this? SQL Data AnalystHard Try Now
A query uses ROW_NUMBER() OVER (PARTITION BY dept_id ORDER BY salary DESC). What does this produce? SQL Data AnalystHard Try Now
What is the key behavioral difference between RANK() and DENSE_RANK() when there are tied values? SQL Data AnalystHard Try Now
What does PERCENT_RANK() return for the first row in a partition ordered by salary ASC? SQL Data AnalystHard Try Now
Which window function calculates a running total of sales ordered by date within each region? SQL Data AnalystHard Try Now
What does LAG(revenue, 2) OVER (ORDER BY month) return for the third row in a result set? SQL Data AnalystHard Try Now
A CTE is defined WITH cte AS (SELECT …). Which statement about CTEs is true? SQL Data AnalystHard Try Now
Which slowly changing dimension (SCD) type overwrites the old attribute value without preserving history? SQL Data AnalystHard Try Now