Derived tables and common table expressions in sql server Part 48

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025

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

  • @anamariacncv
    @anamariacncv 8 лет назад +15

    great video! very useful and very nicely presented! thumbs up :)

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  8 лет назад +7

      Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      ruclips.net/user/kudvenkatplaylists?view=1&sort=dd
      If you need DVDs or to download all the videos for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      ruclips.net/video/y780MwhY70s/видео.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      ruclips.net/user/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  11 лет назад +9

    Thank you very much for taking time to give feedback. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video. For email alerts, when new videos are uploaded, you may subscribe to my channel.

  • @MANJOTSINGH-hu3ef
    @MANJOTSINGH-hu3ef 3 года назад +1

    Lovely and underrated Channel. I wish this was in the spotlight when I was learning SQL. Thanks a lot for your efforts!

  • @mashamarand6132
    @mashamarand6132 7 лет назад +6

    The Best Teacher Ever...:)

  • @krzysztofs8535
    @krzysztofs8535 8 лет назад +2

    Nothing to add. The best video session as always. Feeling better and better in SQL. Different ways of achieving the same results.

  • @santoshadhikari9933
    @santoshadhikari9933 2 года назад +1

    This video has so many useful practical knowledge than any other videos in SQL.

  • @imranism
    @imranism 12 лет назад

    Your teaching is very simple and effective, This is how a teacher should explain

  • @vancouver5327
    @vancouver5327 8 лет назад +1

    I have been following your videos and I found them very useful. I just wanted to thank you for investing so much of your time in creating these super helpful videos.
    Thanks!

  • @TheAndozio
    @TheAndozio 4 года назад

    Great explanation. Clearing too much about this complex matter. Thanks for Brazil.

  • @iemranee
    @iemranee 12 лет назад +1

    Really You provide great lectures. God bless You

  • @hemalatha-wh6wh
    @hemalatha-wh6wh 3 года назад

    Nice video .Very simple to understand the all concepts of cte ,view,temporary table,derived tables..

  • @Cleland1981
    @Cleland1981 11 лет назад +2

    Very good tutorial Venkat. Really clear and easy to follow. This was the first of your tutorials I have seen and I am now planning to start right from the beginning with No.1. Thanks!

  • @fzl20
    @fzl20 12 лет назад

    Excellent job in explaning the concept of derived tables and CTE, with good examples.

  • @m.s.krishnamurthykitta
    @m.s.krishnamurthykitta 2 года назад

    Great explanation with detailed information..love u brother ❣️

  • @tshindaye
    @tshindaye 12 лет назад +7

    Very useful, thank you for sharing this. Another alternative would be 2 to simply add the 'having' keyword after the group by
    having count(*) >= 2.
    My 2 cents.

    • @sahiltikku6970
      @sahiltikku6970 4 года назад +1

      Right I was also thinking the same

  • @bmiller949
    @bmiller949 2 года назад +1

    Now I know why my former coworker used CTE all the time. I always used Table Variables because they reminded me of memory tables in Oracle 8i.

  • @anandvaidya3844
    @anandvaidya3844 10 лет назад

    just seeing this video, i have subscribed to your channel and also downloaded 76 of your videos. I'm sure at the end of my completion of these videos, I would turn out to be a mini KudVenkat... :).... Just at the end of this one video I started feeling like a SQL Professional... :)

  • @DJJSerpico
    @DJJSerpico 3 года назад

    Very good job here. Beautifully illustrated.

  • @karansarang9712
    @karansarang9712 10 лет назад

    Thanks for the Clarification Venkat!! Great Video and very helpful

  • @toalopez
    @toalopez 5 лет назад

    Thank you very much Venkat, if you come to New York, let me know, I will take you out for dinner to eat Indian food or any food on me. Your a great teacher, I can understand you clearly. Keep it up!!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  5 лет назад

      Hello Toalopez - Wow! That's so kind of you. Thank you very much. I am very glad you found the videos useful. I have included all the sql server tutorial series videos, slides and text articles in sequence on the following page. Hope you will find it handy.
      www.pragimtech.com/courses/sql-server-tutorial-for-beginners/
      When you have some time, can you please leave your rating and valuable feedback on the reviews tab. It really helps us. Thank you. Good luck and all the very best with everything you are doing.

  • @dayobabatunde8723
    @dayobabatunde8723 12 лет назад

    Very simple to understand. Thanks for this video.

  • @wasimbader9170
    @wasimbader9170 9 лет назад +3

    thank you for ur great efforts
    thumbs up

  • @manishmahajan7613
    @manishmahajan7613 10 лет назад

    You're the best boss... great great great explanation.

  • @relook5366
    @relook5366 4 года назад

    Thank you! It's clear!

  • @rameshgaurmaths
    @rameshgaurmaths 11 лет назад +1

    Hi Venkat, really good tutorial.

  • @kkeysgolu
    @kkeysgolu 5 лет назад

    Hi Kudventak, KUDO to you.
    thanks a lot for this video

  • @medAmineRg
    @medAmineRg 2 года назад

    thanks man that was very helpful

  • @vishaljhaveri7565
    @vishaljhaveri7565 2 года назад

    Nice video. Thank you, Sir.

  • @EasyStreet88599
    @EasyStreet88599 2 года назад

    Thank you so much!

  • @simonm1229
    @simonm1229 11 лет назад +1

    Thank you very much, good work as always!
    Question: general use of -- # temp tables, table variables, CTE and Derived tables are in Stored Procedures and in Function as far as I guessed. where other places we can use them?
    thank you

  • @henokamdie7623
    @henokamdie7623 8 лет назад

    Thanks Venkat!!!

  • @anandvaidya3844
    @anandvaidya3844 10 лет назад +1

    spot on... may be your full name should be kudos Venkat :)

  • @sureshrajput5794
    @sureshrajput5794 7 лет назад

    Dear Venkat Sir
    Thank you very much for this awesome topic for achieving same result with different ways but now I'm getting confused which one should be used over other??
    Also diff. between Temp table and Table variable

  • @bahadirezici
    @bahadirezici 6 лет назад

    I realized that giving a like before video starts!

  • @sameersawant8733
    @sameersawant8733 6 лет назад +1

    Hi sir great video..... can you make a detailed video on optimization of SQL query as well as video on performance tuning
    ...

  • @HK.on.YouTube
    @HK.on.YouTube 6 лет назад

    Question, @4:59 Line 1 of the query, Doesn't DeptName need to be on both table for any natural join? Or does that not matter for Common tables?

  • @vinaykorrapati5330
    @vinaykorrapati5330 11 лет назад

    Hi,Mr.Venkat Thanks for Sharing this videos. While in this part 48 You wirte a query to count the total no of emp in the dep.
    select depname,deptid,count(*)as totalemp from tblemp
    join tbldep
    on tblemp.deptid=tbldep.deptid
    group by DEPNAME,DEPTID .
    When we see the output where in group by column having two column names so it gives the output based on two columns so it returns output like
    EG: depname count
    it 1
    it 1
    hr 1
    hr 1
    When we group by depname or group by id it will give proper out put what we required .
    Please correct me if am i wrong.. Thanks in advance .
    I am waiting for your asnwer's..

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

    very useful

  • @MisterTonton1
    @MisterTonton1 6 лет назад

    Dear Sir, I thank you for your videos. I would like to know if those videos are still considered as "best practices" nowadays, or we have new technologies available.
    Thank you

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  6 лет назад +3

      Hello Gaga - This SQL course cover basic and some advanced concepts and yes they are still considered as best practices. Hope this answers your question.

  • @AltafHussain-yo4yp
    @AltafHussain-yo4yp 10 лет назад

    Hi Venkat
    Nice video....!! thnx for explaing each concept with examples :)
    but without DerivedTable,View,CTE,TableVariable we can get the output with the following query
    SELECT D.DEPT_NAME,COUNT(*) AS TOTAL_EMP
    FROM DEPT D,EMPLOYEE E
    WHERE D.DPET_ID=E.DPET_ID
    GROUP BY D.DEPT_NAME
    HAVING COUNT(*)>1

  • @KiranNadukula
    @KiranNadukula 12 лет назад

    Hi, venkat could you please make videos on AJAX Controls. I watched a lot of videos but could not understand any of them because they are not a match to the way you explain. So, please make some videos on Ajax controls venkat. I request please...................

  • @adriangg9018
    @adriangg9018 9 лет назад +1

    why is the DepartmentId not shown when you use CTE? Thank you for your work bro

    • @FreddyT904
      @FreddyT904 9 лет назад +1

      +Adrian Gg because departmentID is not in the select statement. if added to the select statement it would show up

  • @semikolon4229
    @semikolon4229 6 лет назад

    thanks

  • @PankajKumar-tb5up
    @PankajKumar-tb5up 6 лет назад

    In table variable section you mentioned that we can use table variables as parameters between stored procedure.
    I tried to achieve this. but not working.
    Please take a look.

  • @stutitehri993
    @stutitehri993 10 лет назад +1

    this is very important feature introduced in sql 2008

  • @siddhi_chotaliya
    @siddhi_chotaliya 6 лет назад

    Question: Local Temp Table is going to delete anyway after the session ends then why is it good practice to DROP the TEMP Table??

    • @saikiranp.r6966
      @saikiranp.r6966 6 лет назад

      Good question. I am also looking for answer

  • @MillennialMom-s8s
    @MillennialMom-s8s 4 года назад

    Select DeptName, DepartmentId, COUNT(*) as TotalEmployees
    from tblEmployee
    join tblDepartment
    on tblEmployee.DepartmentId = tblDepartment.DeptId
    group by DeptName, DepartmentId
    having COUNT(*) >=2
    order by DeptName, DepartmentId
    This query also works we don't have to create view for it or even CTE right???
    Could you please explain sir

  • @sreenuksr
    @sreenuksr 10 лет назад

    very nice

  • @yiyuan6844
    @yiyuan6844 7 лет назад

    good video

  • @mpkarthick1
    @mpkarthick1 8 лет назад

    Pls explain about magic table in sql

    • @saikiranp.r6966
      @saikiranp.r6966 6 лет назад

      Magic tables gets created when a trigger is fired. Two magic tables are created inserted which holds new values and deleted which holds the deleted or previous values

  • @rashmi933
    @rashmi933 8 лет назад

    Hi Venkat could you please create one video on Materialized view in SQLSERVER , Thanks in advance

    • @sureshrajput5794
      @sureshrajput5794 7 лет назад

      Rashmi Sinha hi when u create index on view than a view gets materialzed meaning a view is now can store a data. he sas already done this. please watch indexes session

  • @luisgomez3109
    @luisgomez3109 3 года назад

    Hi, I executed a derived table and it work perfectly. But when i try to use CTEs it won´t work.
    Can i get a little help? The query in the parenthesis gives me a list of "INSUMOS" with FRACCIONR8 ='9802001300'. However, this table still has different "PERMISOR8" in the columns. I´m trying to get only those INSUMOS with PERMISOR8 0203R821001194. I´m only trying to comprehend how to use CTEs, but im not sure this function is available in our system.
    thank you.
    WITH R8SEARCH (INSUMOS, DESCRIPTION, FRACCIONR8, PERMISOR8)
    AS
    (
    SELECT INSUMOS, DESCRIPTION, FRACCIONR8, PERMISOR8 FROM DETALLEI WHERE FRACCIONR8='9802001300'
    )
    SELECT INSUMOS, DESCRIPTION FROM R8SEARCH WHERE PERMISOR8='0203R821001194';

  • @ManishSharma-js4br
    @ManishSharma-js4br 6 лет назад

    What is the difference between CTE and Table Variable ... I have been asked this question by interviewer frequently ...

    • @saikiranp.r6966
      @saikiranp.r6966 6 лет назад +1

      Cte scope is limited to the next line right after the cte declaration. Where as table variable can be used anywhere within the script.

  • @KD-wp6cm
    @KD-wp6cm 3 года назад +1

    2021

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

    Please I need the code written for this course

  • @swaroop8728
    @swaroop8728 2 года назад

    Can anyone please explain in
    Select DeptName, DepartmentId, Count(*) as TotalEmployees from tblEmployee why it is takin count(DepartmentId) instead of Id column ie count(Id) in tblEmployee.

  • @bangbang-yj5oh
    @bangbang-yj5oh 2 года назад

    you are very fast and you know you know

  • @Nengh-wo4tx
    @Nengh-wo4tx 4 года назад

    Why didn't you use having here?

  • @devops321
    @devops321 6 лет назад

    Sir, please open your tutorials.blogspot.com.

  • @prafulrane3591
    @prafulrane3591 Месяц назад +1

    Anyone in 2025?

  • @gokulsn8909
    @gokulsn8909 11 месяцев назад

    Thankyou