Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Skill

Advanced SQL

Answer analytical questions with window functions, CTEs, grouping sets and set operations, and write the deduplicating and upserting SQL that pipelines depend on.

Intermediate1 roadmap

4 objectives 6 steps about 155 min

Learn it step by step

Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.

Start learning

This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.

Learning objectives

  • Compute rankings, running totals, period-over-period changes and moving averages with window functions and explicit frames.
  • Structure multi-step logic with CTEs, including a recursive CTE that walks hierarchical data.
  • Produce multi-level summaries with GROUPING SETS or ROLLUP, pivot rows into columns (and back) with conditional aggregation or LATERAL, and compare result sets with UNION, INTERSECT and EXCEPT.
  • Keep the latest record per key with ROW_NUMBER-based deduplication, apply changes to a target table with MERGE, and package the load as a parameterized SQL function or procedure.

Lesson plan

6 steps, about 155 min · 5 of 5 lessons available so far

Practise it

On an orders-and-events dataset, write SQL that returns monthly revenue with month-over-month growth, each customer's first and latest order, a 7-day moving average of sign-ups, a category-by-month revenue pivot, a category hierarchy built with a recursive CTE, and a deduplicated customer table maintained by a MERGE wrapped in a stored procedure; tests compare every output with expected results.

References

Hard prerequisites

Unlocks

Nothing depends on this skill yet.

On these roadmaps

Progress and evidence for this skill are shared across all of them.