D3: SQL Analysis in Redshift & Athena
AWS Associate Data Engineer – Associate exam practice questions · 10 flashcards
Question
Window function example?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 SQL Analysis in Redshift & Athena practice questions and answers
- Window function example?SUM(sales) OVER (PARTITION BY region ORDER BY month) for running totals.
- ROW_NUMBER vs RANK?ROW_NUMBER gives unique sequential numbers; RANK gives ties the same rank with gaps.
- CTE?Common table expression (WITH clause) to structure complex queries.
- Deduplication with SQL?Use ROW_NUMBER() OVER (PARTITION BY key ORDER BY updated DESC) and keep row 1.
- Approximate functions?APPROX_COUNT_DISTINCT / approx_distinct for fast estimates on big data.
- PIVOT in Redshift?PIVOT/UNPIVOT operators rotate rows to columns and back.
- Redshift Query Editor v2?Web SQL editor with notebooks, charts, scheduling and generative SQL.
- Athena EXPLAIN?Shows query plan to optimize joins and filters.
- Join optimization in Athena?Put the larger table on the left and smaller on the right; filter early.
- GROUP BY with ROLLUP/CUBE?Produce subtotals and grand totals across dimensions.