Complex SQL Breakdown (CTEs, Subquery, and More)

Поделиться
HTML-код
  • Опубликовано: 24 июл 2024
  • 📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-...
    🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql...
    At some point in your SQL journey, you'll come across SQL queries that are more complicated - queries that are long, or contain things like Common Table Expressions, subqueries, and other features.
    In this video, we'll start with a complex SQL query, and take small steps to understand what it is doing. We'll add comments along the way, and at the end we'll be able to understand what the whole query is doing.
    ⏱ TIMESTAMPS:
    00:00 - Our complex query
    01:37 - Formatting the query
    03:22 - Base tables
    05:58 - First subquery
    08:24 - First CTE
    09:53 - Subquery in second CTE
    12:28 - The next subquery
    15:04 - Second CTE
    17:18 - Main query
    🔗 VIDEO LINKS:
    The query we start with in this video: github.com/bbrumm/databasesta...
    Sample data for the query: github.com/bbrumm/databasesta...
  • НаукаНаука

Комментарии • 10

  • @oyakalesola7458
    @oyakalesola7458 4 месяца назад +1

    Absolutely brilliant, this is what I need wish I had found it early but thank God I finally found it.

    • @DatabaseStar
      @DatabaseStar  4 месяца назад

      Thanks, I’m glad you found it useful!

  • @elfridhasman4181
    @elfridhasman4181 Год назад

    Your Explanation Always the best, Thank you Ben

  • @osoriomatucurane9511
    @osoriomatucurane9511 7 месяцев назад

    Sorry, in the first place what was the query about? I mean, what was asked or requested to return/retrieve?

    • @DatabaseStar
      @DatabaseStar  6 месяцев назад

      That's what this video explains - it's a query to show the standings or ladder for a football league.

  • @mohammedbayomy6154
    @mohammedbayomy6154 9 месяцев назад

    Perfect ^__^

  • @aleksandr2245
    @aleksandr2245 Год назад

    great videos as always