Wun Code
SQL

Advanced SQL Queries

Join tables together, write a query inside a query, and put window functions to work.

Start the trackFree, no sign-up needed

What you'll learn

  • Joining two tablesMatching rows with INNER JOIN
  • Left joinsLEFT JOIN and checking with IS NULL
  • Totals per customerCombining JOIN with GROUP BY
  • Joining three tablesTwo JOINs in a row
  • SubqueriesA query inside a query
  • Naming intermediate resultsNaming each step with WITH
  • The top row in each groupNumbering with ROW_NUMBER and splitting with PARTITION BY
  • Running totalsSUM with OVER
  • Changing dataINSERT, UPDATE and DELETE
  • Table constraintsRules the database enforces

Track contents

10 lessons, 2.5 hours in total
  1. 1Joining two tablesSQLMatching rows with INNER JOIN
  2. 2Left joinsSQLLEFT JOIN and checking with IS NULL
  3. 3Totals per customerSQLCombining JOIN with GROUP BY
  4. 4Joining three tablesSQLTwo JOINs in a row
  5. 5SubqueriesSQLA query inside a query
  6. 6Naming intermediate resultsSQLNaming each step with WITH
  7. 7The top row in each groupSQLNumbering with ROW_NUMBER and splitting with PARTITION BY
  8. 8Running totalsSQLSUM with OVER
  9. 9Changing dataSQLINSERT, UPDATE and DELETE
  10. 10Table constraintsSQLRules the database enforces