Darling Data/Learn T-SQL With Erik

  • $250 or 2 monthly payments of $125

Learn T-SQL With Erik

  • Course
  • 134 Lessons

This course is all about T-SQL. You'll learn how to write queries that return correct results, and don't make the server break down when they run. This material spans beginner to advanced, and includes concepts applicable to transactional and reporting workloads. Whether you're designing the next super high concurrency application, or working as a data scientist, engineer, or analyst, this course is for you.

Contents

Course Introduction - 6 minutes
    Preview
    Environment Setup - 6 minutes
      Reference Script Explanation - 7 minutes
        01 Course Instructions.sql
        • 1.25 KB
        03 Common T-SQL Usage And Functions.sql
        • 7.45 KB
        02 Common T-SQL Conventions.sql
        • 10.5 KB
        04 Data Storage.sql
        • 13.8 KB

        Starting T-SQL Querying: Reading Data

        Look, we've all been there. You write what seems like a perfectly reasonable query, hit F5, and then... nothing happens. Or worse, everything happens, including your phone blowing up with angry users.

        This course will teach you how T-SQL actually works, not just how the docs say it works. Designed specifically for folks bridging the gap from novice to intermediate, you'll learn to write queries that don't make your server cry or your users wonder if they've made a huge mistake.

        I've packed over 24 hours of streaming video content (complete with scripts and slides!) with all the stuff I wish I'd known when I first opened SQL Server Management Studio back in 2008. This treasure trove works with SQL Server 2016+, Azure SQL Database, and Azure SQL Managed Instance.

        What's on the menu? All the fundamentals explained in plain English:

        • The SELECT statement that does more than just "select everything"

        • JOINs that actually make sense (and don't accidentally create cartesian products)

        • Subqueries and table expressions that solve problems instead of creating them

        • Window functions without the headache

        • Basic transactions that don't lock up the entire database

        • Data modifications that don't leave your tables looking like abstract art

        Perfect for folks who know enough T-SQL to be dangerous (to their own servers) but want to level up to the kind of queries that make your DBA send you thank-you notes instead of passive-aggressive monitoring alerts.

        You'll gain insights into relational theory, query optimization, and set-based thinking – all explained like you're a human, not a computer.

        Ready to write T-SQL that doesn't make users wonder if they've made a huge mistake?

        Let's do this!

        SELECT FROM WHERE: Lecture - 11 minutes
          SELECT FROM WHERE: Demos - 16 minutes
            SELECT FROM WHERE.sql
            • 11.6 KB
            WHERE, HAVING, and Conditional Aggregates - 18 minutes
              WHERE and Having.sql
              • 10.8 KB
              Join Introduction: Lecture - 8 minutes
                Join Introduction: Demos - 15 minutes
                  00 Joins.sql
                  • 7.02 KB
                  Cross Join Basics: 10 minutes
                    01 Cross Joins.sql
                    • 4.84 KB
                    Inner Joins Basics - 17 minutes
                      02 Inner Joins.sql
                      • 6.55 KB
                      Outer Join Basics: 23 minutes
                        03 Outer Joins.sql
                        • 9.91 KB
                        Apply Basics: Introduction and TOP N Per Group - 20 minutes
                          Apply Basics: The VALUES Clause - 12 minutes
                            APPLY.sql
                            • 11.6 KB
                            DISTINCT - 26 minutes
                              DISTINCT.sql
                              • 10.3 KB
                              Group By Part 1 - 17 minutes
                                Group By Part 2 - 15 minutes
                                  GROUP BY.sql
                                  • 17.9 KB
                                  Order By Introduction - 15 minutes
                                    ORDER BY.sql
                                    • 7.03 KB
                                    Order By and Index Design - 15 minutes
                                      02 Index Sortables.sql
                                      • 4.63 KB
                                      TOP and OFFSET FETCH - 31 minutes
                                        TOP and OFFSET FETCH.sql
                                        • 12.8 KB
                                        CASE Expressions - 26 minutes
                                          00 CASE Expressions.sql
                                          • 15.6 KB
                                          Defensive CASE Expressions - 21 minutes
                                            01 Defensive CASE Expressions.sql
                                            • 15.9 KB
                                            Subqueries - 21 minutes
                                              Subqueries.sql
                                              • 9.19 KB
                                              EXISTS and NOT EXISTS - 25 minutes
                                                EXISTS and NOT EXISTS.sql
                                                • 12.7 KB
                                                Derived Tables - 18 minutes
                                                  Derived Tables.sql
                                                  • 11.9 KB
                                                  Common Table Expressions - 26 minutes
                                                    Common Table Expressions.sql
                                                    • 16.9 KB
                                                    Recursive Common Table Expressions - 23 minutes
                                                      Recursive Common Table Expressions.sql
                                                      • 14.8 KB
                                                      Window Function Basics - 35 minutes
                                                        Window Functions.sql
                                                        • 15.5 KB
                                                        Window Functions: Solving Common Problems - 25 minutes
                                                          Window Function Problem Solvers.sql
                                                          • 15.8 KB
                                                          Grouping Sets, Cube, and Rollup - 20 minutes
                                                            Grouping Sets, Cube, Rollup.sql
                                                            • 11.4 KB
                                                            Pivot and Unpivot - 22 minutes
                                                              Pivot and Unpivot.sql
                                                              • 13.1 KB
                                                              Union and Union All - 15 minutes
                                                                01 The Unions.sql
                                                                • 7.05 KB
                                                                Intersect - 19 minutes
                                                                  02 INTERSECT.sql
                                                                  • 9.53 KB
                                                                  Except - 14 minutes
                                                                    03 EXCEPT.sql
                                                                    • 9.65 KB
                                                                    Distinct From - 21 minutes
                                                                      04 DISTINCT FROM.sql
                                                                      • 10.2 KB
                                                                      NULLs and Datatypes - 27 minutes
                                                                        NULLs, Data Types.sql
                                                                        • 13.3 KB
                                                                        SARGability - 18 minutes
                                                                          SARGability.sql
                                                                          • 7.54 KB

                                                                          Starting T-SQL Querying: Data Modifications

                                                                          In this section we'll cover data modifications in T-SQL:

                                                                          • INSERT

                                                                          • Identity

                                                                          • Sequence

                                                                          • DELETE

                                                                          • TRUNCATE

                                                                          • UPDATE

                                                                          • MERGE

                                                                          • OUTPUT

                                                                          Insert Basics - 21 minutes
                                                                            01 Insert.sql
                                                                            • 13.3 KB
                                                                            Identity Basics - 24 minutes
                                                                              02 Identity.sql
                                                                              • 10.3 KB
                                                                              Sequences Basics - 16 minutes
                                                                                03 Sequences.sql
                                                                                • 9.37 KB
                                                                                Delete and Truncate Basics - 18 minutes
                                                                                  01 Delete and Truncate.sql
                                                                                  • 8.56 KB
                                                                                  Update Basics - 20 minutes
                                                                                    01 Update.sql
                                                                                    • 10.3 KB
                                                                                    Merge Basics - 20 minutes
                                                                                      01 Merge.sql
                                                                                      • 7.33 KB
                                                                                      Output Basics - 23 minutes
                                                                                        01 Output.sql
                                                                                        • 12.7 KB

                                                                                        Starting T-SQL Querying: Transactions and Isolation Levels

                                                                                        Very few areas of databases in general, but SQL Server in particular, suffer as many misconceptions and outright misinformation as these. Developers seem to maintain these nagging mental injuries, like row versioning isolation levels allow dirty reads, or locking isolation levels guarantee snapshot-type consistency of reads, that are simply wrong. In these modules, I'm going to show you the truth.

                                                                                        A.C.I.D. Basics - 15 minutes
                                                                                          00 A.C.I.D..sql
                                                                                          • 5.99 KB
                                                                                          Transaction Basics - 20 minutes
                                                                                            01 Transactions.sql
                                                                                            • 9.49 KB
                                                                                            Isolation Level Basics (Lecture) - 22 minutes
                                                                                              02 Isolation Levels.sql
                                                                                              • 8.11 KB
                                                                                              Serializable Basics - 13 minutes
                                                                                                03 Serializable.sql
                                                                                                • 6.26 KB
                                                                                                Deadlocks Lecture - 10 minutes
                                                                                                  Deadlock Demos - 22 minutes
                                                                                                    05 Deadlocks.sql
                                                                                                    • 11.1 KB
                                                                                                    Read Uncommitted and NOLOCK - 21 minutes
                                                                                                      06 Read Uncommitted.sql
                                                                                                      • 7.45 KB
                                                                                                      Locking vs Row Versioning Read Committed - 16 minutes
                                                                                                        07 Locking vs Versioning.sql
                                                                                                        • 8.35 KB
                                                                                                        Read Committed Inconsistencies Part 1 - 10 minutes
                                                                                                          Read Committed Inconsistencies Part 2 - 15 minutes
                                                                                                            07a Read Committed Iconsistency.sql
                                                                                                            • 11.2 KB
                                                                                                            Selects That Block and Deadlock - 24 minutes
                                                                                                              07b Read Committed Blocking and Deadlocking.sql
                                                                                                              • 7.04 KB
                                                                                                              Read Committed Concurrency Phenomena - 13 minutes
                                                                                                                07c Read Committed Oddity.sql
                                                                                                                • 5.75 KB
                                                                                                                RCSI and Modifications - 17 minutes
                                                                                                                  07d Read Committed Snapshot Isolation.sql
                                                                                                                  • 10.1 KB

                                                                                                                  Starting T-SQL Querying: Programmability

                                                                                                                  SQL is for queries, not programming! Well, kind of. Turns out, you can do a lot whole of procedural programming in your declarative language. In these modules, I'll cover all the major types of modules you can create, along with things like cursors, loops, control-flow logic, dynamic SQL, and temporary objects. Get ready for fun.

                                                                                                                  00 Programmability.sql
                                                                                                                  • 2.76 KB
                                                                                                                  Declared Variables - 21 minutes
                                                                                                                    01 Declared Variables.sql
                                                                                                                    • 11.3 KB
                                                                                                                    Control Flow Logic - 14 minutes
                                                                                                                      02 Control Flow.sql
                                                                                                                      • 8.76 KB
                                                                                                                      WHILE Loops - 15 minutes
                                                                                                                        03 While Loops.sql
                                                                                                                        • 9.2 KB
                                                                                                                        Cursor Basics - 21 minutes
                                                                                                                          04 Cursors.sql
                                                                                                                          • 8.23 KB
                                                                                                                          Dynamic SQL Basics - 31 minutes
                                                                                                                            05 Dynamic SQL.sql
                                                                                                                            • 16.9 KB
                                                                                                                            Temporary Objects - 31 minutes
                                                                                                                              06 Temporary Tables.sql
                                                                                                                              • 11.3 KB
                                                                                                                              Error and Transaction Handling Basics - 28 minutes
                                                                                                                                07 Error Handling.sql
                                                                                                                                • 12.1 KB
                                                                                                                                Views and Indexed Views - 32 minutes
                                                                                                                                  08 Views and Indexed Views.sql
                                                                                                                                  • 13.7 KB
                                                                                                                                  Triggers - 25 minutes
                                                                                                                                    09 Triggers.sql
                                                                                                                                    • 18 KB
                                                                                                                                    Scalar UDFs - 25 minutes
                                                                                                                                      10 Scalar UDFs.sql
                                                                                                                                      • 12.9 KB
                                                                                                                                      Multi-Statement Functions - 16 minutes
                                                                                                                                        11 Multi-Statement Functions.sql
                                                                                                                                        • 6.68 KB
                                                                                                                                        Inline Table Functions - 24 minutes
                                                                                                                                          12 Inline Functions.sql
                                                                                                                                          • 9.55 KB
                                                                                                                                          Stored Procedures - 30 minutes
                                                                                                                                            13 Stored Procedures.sql
                                                                                                                                            • 14.1 KB