Code24Lab
Databases & SQL Intermediate

Oracle SQL in Practice: Joins, Subqueries, Hierarchies & Analytics

Read and reason through real Oracle SQL on a fictional company schema: ANSI and (+) joins, subqueries, CONNECT BY hierarchies, recursive WITH, ROLLUP and CUBE, analytic functions and MERGE, with every answer checked as you go.

22 lessons 22 labs Certificate

  • One-time payment
  • Instant access right after payment
  • Secure checkout with Stripe

About this course

In this intermediate course you work through 22 hands-on labs on a fictional company schema and predict exactly what real Oracle SQL returns. You join tables in ANSI and classic (+) syntax, spot Cartesian products and lost rows, and evaluate single-row, multi-row and correlated subqueries, EXISTS and the NOT IN NULL trap. You walk org charts with START WITH, CONNECT BY, LEVEL, SYS_CONNECT_BY_PATH and recursive WITH, build subtotals with ROLLUP, CUBE and GROUPING SETS, rank and compare rows with analytic functions, LAG and window frames, and predict the effect of a MERGE. Every answer is checked instantly, the first lesson is free, and a final exam leads to your certificate.

Lessons

  1. ANSI Joins in Oracle: JOIN … ON, USING and Lost RowsLabFree
  2. Old-Style Comma Joins and the Cartesian Product TrapLab Locked
  3. Non-Equi Joins: Matching Rows to Ranges with BETWEENLab Locked
  4. Outer Joins: LEFT, RIGHT, FULL and Oracle's (+) OperatorLab Locked
  5. Self Joins: Employees Next to Their ManagersLab Locked
  6. Single-Row Subqueries: Compare Against a Computed ValueLab Locked
  7. Multi-Row Subqueries: IN, ANY and ALLLab Locked
  8. Correlated Subqueries: Compare Each Row With Its Own GroupLab Locked
  9. EXISTS, NOT EXISTS and the NOT IN NULL TrapLab Locked
  10. Top-N Queries: ROWNUM, Inline Views and FETCH FIRSTLab Locked
  11. Hierarchical Queries: START WITH, CONNECT BY and LEVELLab Locked
  12. Paths, Leaves and Subtrees: SYS_CONNECT_BY_PATH and CONNECT_BY_ISLEAFLab Locked
  13. Walking Up the Tree and Pruning BranchesLab Locked
  14. Recursive WITH: Anchor, Recursive Member and Running ValuesLab Locked
  15. CONNECT_BY_ROOT, Several Roots and CyclesLab Locked
  16. ROLLUP: Subtotals and Grand Totals in One QueryLab Locked
  17. CUBE and GROUPING SETS: Every Subtotal You Ask ForLab Locked
  18. Analytic Functions: SUM OVER, PARTITION BY and RATIO_TO_REPORTLab Locked
  19. Ranking: RANK, DENSE_RANK, ROW_NUMBER and Top-N per GroupLab Locked
  20. LAG, LEAD and Window Frames: Changes, Running Totals, Moving AveragesLab Locked
  21. MERGE: Update and Insert in One StatementLab Locked
  22. Final Project: A Department Scorecard With Joins and AnalyticsLab Locked