Advanced T-SQL Takeover!

Sdílet
Vložit
  • čas přidán 6. 07. 2024
  • By now you know the basics of T-SQL, in this session, we will discuss how to solve T-SQL problems using more complex T-SQL concepts like CTEs, Window Functions, and newer less used functions!
    Check Out Our SQL Blog - blog.pragmaticworks.com/topic/...
    👍 If you enjoy this video and are interested in formal training on Power BI, Power Apps, Azure, or other Microsoft products you can use the code "youtube20" at check out when purchasing our On-Demand Learning classes to get an extra 20% off - pragmaticworks.com/pricing/
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - -
    Next step on your journey:
    👉 On-Demand Learning Courses FREE Trial: learning.pragmaticworkstraini...
    🔗Pragmatic Works On-Demand Learning Packages: pragmaticworks.com/pricing/
    🔗Pragmatic Works Boot Camps: pragmaticworks.com/boot-camps/
    🔗Pragmatic Works Hackathons: pragmaticworks.com/private-tr...
    🔗Pragmatic Works Virtual Mentoring: pragmaticworks.com/virtual-me...
    🔗Pragmatic Works Enterprise Private Training: pragmaticworks.com/private-tr...
    🔗Pragmatic Works Blog: blog.pragmaticworks.com/
    Let's connect:
    ✔️Twitter: / pragmaticworks
    ✔️Facebook: / pragmaticworks
    ✔️Instagram: / pragmatic.works
    ✔️LinkedIn: / pragmaticworks
    ✔️CZcams: / pragmaticworks
    Pragmatic Works
    7175 Hwy 17, Suite 2 Fleming Island, FL 32003
    Phone: (904) 413-1911
    Email: training@pragmaticworks.com

Komentáře • 38

  • @alexpajp123
    @alexpajp123 Před 5 lety +16

    This guy is a talented teacher.

  • @JustBiTurbo
    @JustBiTurbo Před 4 lety +2

    Thanks Mitchell! Well explained

  • @AvagyanAvag
    @AvagyanAvag Před 2 lety

    Very helpful intro, thanks a lot Mitchell!

  • @bisratgezahgne914
    @bisratgezahgne914 Před 4 lety

    Thanks , Easy to Understand

  • @cormackeenan8175
    @cormackeenan8175 Před 3 lety +1

    I learnt a lot thanks, Q: how import is it to size tables so they fit cluster on the disc on a 64 bit system, or has SSD rendered this notion obsolete?

  • @carrotcarrot3237
    @carrotcarrot3237 Před 3 lety

    thank you so much sir. very helpful . God bless you

  • @timothymbogo5849
    @timothymbogo5849 Před 5 lety

    Thanks Good tutorial

  • @marklandgraf7667
    @marklandgraf7667 Před 2 lety +2

    A CTE can also be preceded with GO instead of a semicolon. GO might be a little bit more readable for some.

  • @kevintownsley8500
    @kevintownsley8500 Před 3 lety

    @26:02 I'm trying out 'ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING' on my own dataset and I'm getting the exact same result as 'ROWS UNBOUNDED PRECEDING', essentially a running total instead of a countdown. Any idea what's causing this?

  • @tbowyer8210
    @tbowyer8210 Před 5 lety +13

    The sound breaks occasionally.
    Gets down to business at 03:19

  • @Pestrutsi
    @Pestrutsi Před 3 lety

    In SSMS how do you
    1) Select boxed pieces of SQL code as you do at 1:09:50 as when I'd try to do that normally, I'd select every line fully, not just a boxed part of the code as you would select let's say a rectangular subset of a set of folders/programs in Windows OS
    2) Add commas to multiple lines as you do in 1:10:00
    Many thanks for any responses!

    • @vasilybulochkin4622
      @vasilybulochkin4622 Před 3 lety +3

      1. hold alt
      2. shift+alt+down arrow OR shift+alt+mouse click to add cursors, then you just type in what you need and it will appear on all cursors. to get back to one cursor press Esc

  • @darshanparulekar778
    @darshanparulekar778 Před 3 lety +2

    hey mitchell ,do i have to see any pre videos before jumping to this

    • @PragmaticWorks
      @PragmaticWorks  Před 3 lety +2

      Hi Darshan, you don't need to watch any pre videos before this one.

  • @drakegao816
    @drakegao816 Před 2 lety

    it is weird that I tried rows between 'current row and unbounded following' and got the same result as 'current row and unbounded preceding'. Could that be because of my order by selection in the window function?

  • @goodcbd6039
    @goodcbd6039 Před 3 lety

    Hello mitchell, great video. One question:
    Why at 1:26:20 the SUM OVER PARTITION BY aggregates on the all rows (like and un-expected behavior?) instead of the default behavior which is until CURRENT_ROW.
    Also, is the WHERE clause affects the Window/Frame range?
    Thank you

  • @lordybahi2781
    @lordybahi2781 Před 2 lety

    Hello, How to get the DEMO's SCRIPTS of the webinar?

  • @bilelkaaniche2204
    @bilelkaaniche2204 Před 3 lety

    for the first business problem , we should use this query :
    ;with salesdetails as (
    select
    SalesOrderID , CustomerID , TotalDue,
    row_number() over (partition by CustomerID order by SalesOrderID) as RN
    from sales.SalesOrderHeader
    )
    select SO.CustomerID ,
    sum( case when RN

  • @akirablac
    @akirablac Před rokem

    'MicrosoftStockHistory' table doesn't exist in AdventureWorks2016 database. Where should I get it?

  • @junaidmalik9593
    @junaidmalik9593 Před 2 lety +1

    Wow is this the same Mitchelle Pearson wgo teaches Azure on you tube? If yes tgen big fan

    • @PragmaticWorks
      @PragmaticWorks  Před 2 lety +1

      It is! Thanks Junaid, thanks for the kind comments. -Mitchell Pearson

  • @manojtalwar7407
    @manojtalwar7407 Před rokem

    Hello Mitchell, don't have access to AdventureWorks2016 database - to be able to see MicrosoftStockHistory table. Any idea pls?

  • @Astus314
    @Astus314 Před 5 lety +2

    Got a bit confused at 26:20 because the 'ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING' doesn't give a true reverse running total. Look at the totaldue value for the top 3 rows. xxxxx994.838, xxxxx658.438, xxxxx793.798.
    It's jumbled the order. Sorry if this is covered later in the video. :)

    • @houstonbova3136
      @houstonbova3136 Před 3 lety

      It looks like the functionality sorts on column order from left to right. If you notice the values are flipped and the order values for the second column PurchaseOrderDetailID is also flipped. I have a feeling if you added this column as a secondary ORDER BY this error would be visually corrected. It seems like the partition by was calculated under this assumption but, it wasn't displayed out with this assumption.

  • @Pooja-pd1ee
    @Pooja-pd1ee Před 3 lety

    haha.. It literally cracked me up was when he said - "I used to do stocks but then I got married". Why would he say something like that? :P However, overall it was a great session on analytical functions.

    • @sumankhanal5821
      @sumankhanal5821 Před 3 lety

      He didn't wanna engage in risky business which revolves around probability especially after a responsible step like marriage.

  • @swetawalker8390
    @swetawalker8390 Před rokem

    hello do you give private lesson

  • @freakzisback
    @freakzisback Před 2 lety

    Derived tables are great if u need to use sql as a view. CTEs cannot be made to views.

  • @isaacmihaeli3261
    @isaacmihaeli3261 Před 4 lety

    Sorry sound brakes off.

  • @ulysses1904
    @ulysses1904 Před 2 lety

    Please stop saying "kind of".