CTE in SQL (Common Table Expression) | SQL WITH Clause | CTE Query Performance | Advanced SQL
To enhance your career as a Cloud Data Engineer, Check trendytech.in/?src=youtube&su... for curated courses developed by me.
I have trained over 20,000+ professionals in the field of Data Engineering in the last 5 years.
CTE in SQL | Common Table Expression | SQL WITH Clause | CTE Query Performance | Advanced SQL
In this video you will learn about CTE (Common table expressions) In SQL. The WITH clause really simplifies the complicated queries, and makes the SQL queries readable.
with Inner query we can see the code getting messy and there is a lot of redundancy.
Also we have talked about the performance of queries using CTE.
We even saw how CTE can degrade the performance.
CTE is very important from SQL Interview perspective, I hope this video should have given you a good idea on how to work with Common table expression in SQL.
J𝗼𝗶𝗻 𝗺𝗲 𝗼𝗻 𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:🔥
🔅Sumit LinkedIn - / bigdatabysumit
🔅Sumit Instagram - / bigdatabysumit
If you haven't subscribed to the channel then please do subscribe for more insightful content
#CTE #AdvancedSQL #WITHClause #bigdata #dataengineering
Пікірлер: 91
Checkout the Big Data course details here: trendytech.in/?referrer=youtube_sqladv1
Thankyou for the video Sir. 3 months back I started preparing for interviews. I have watched almost all of your videos here. It helped me a lot in interviews. Today I have 7+ offer and all from top product companies. Invest in yourself, you will get best ROI... In my case 6x in 14 months. And Sumit sir played a very important role.
@abhimanyutiwari100
2 жыл бұрын
Hi, which profile vikash? Data engineer? I'm in Data analyst position and CTC is not that good (~4 LPA) Is it possible to increase my CTC to 8~9 LPA within 1 year?
@vikastiwari901
2 жыл бұрын
@@abhimanyutiwari100 yeah i am a data engineer. u can definitely expect a good number provided u r prepared well
@vikassrivastava7081
2 жыл бұрын
@@vikastiwari901 bro what imp topics we need to cover for data engineer profile?
@ajaypatil5152
Жыл бұрын
Hi, can you please tell mi which topics are mostly asked in interviews and what is the level of questions asked for SQL ? Cause now I am feeling like that I am preparing everything and I am confusing myself.
Just a suggestion please share the table and it's contents as a link in video. So that while learning we can practice side by side. Btw, course is very helpful and builds confidence in SQL.
@rtecunit602
Ай бұрын
i really like this suggestion, and would like to see this as well
I learn with clause on my own after referring bunch of codes in project that i am working on, took lot of time to understand it. Now that i know it, got addicted to it, its very useful. Wish i would have seen this video earlier Thanks Sumit Sir
The depth in your videos is incredible!
"Fantastic explanation! Your detailed breakdown of the concepts and step-by-step walkthrough made it easy to follow along. The examples you provided really helped to clarify the more complex parts. Thank you for making such an informative and well-structured video!"
It's one of the best tutorial with in depth explanations and clarity. You just made understanding & working of CTE so easy with your explanations sir. Hats off to you for this.
This tutorial gave full clarity on CTE(With clause). Thank you sir. Could you please make videos on hints and optimization tuning? It will help us a lot.
Excellent in-depth video Sumit sir. Really liking it and will benefit us to a great extent.
explained very clearly!! hats off
Thanks for the explanations. It has made CTE and subqueries clearer.👌
Thank you for such a nice and informative tutorial on CTE. This cleared a lot of doubts.
Thank you so much for the detailed video for CTE
Thank you @ Sumit Mittal Sir for an amazing video on CTE.
Was eagerly waiting for it Thank you Sumit
Please create one vedio with the brief description of all the topics which u r going to cover in Advance SQL playlist.
CTE looked like a mysterious concept initially after just looking into some of the articles from google search, this video has made it look easy to grasp its purpose, syntax, benefits, possible limitations & internals, explained in a way that makes learning interesting & joyful, thank you very much sir :)
It is really advanced CTE concept 😊😊😊😊
Great lecture sir........thank you 👏
Amazing Lecture.
Thanks, very good explanation, please keep on providing right knowledge to all of us😊 Please do videos on optimizations...
great.. thank you so much!!
SQL tuning and optimization please sir!! Thank you and really great work.
best video on cte
Great video sir . thanks for the effort
Very nicely explained , Maza aa gya :) !!
Well explained. Thank you sir :)
Thank you sir, Do more please sirrr...
This video is very helpful sir, i have used CTE before but didn't know about having more than 1 table in WITH clause. Can you also explain about in your next video. Thankyou Sir
Marvellous💯
Thanks sir It helps alot
Make more videos sir, we'd appreciate them if posted soon, thankyou
first the video length discouraged me. but later I felt that its worthy.
It Is very helpful!
Great explanation
Thank you so much sir for this video, it was really helpful. Please make video on Facts and Dimensions also, you explain so well and these are important topics as well..Please please
love u sir
Sir please continue the series where you used to solve leet code problems
Awesome 😎👍
Thank you sir, Can you do a video on TRANSACTION, COMMIT, and ROLLBACK Statements ?
Great 👍👍
excellent
Sir... Your are killing it... 💯💯❤ ,Best sql series available on internet.
@sumitmittal07
2 жыл бұрын
Thank you. Happy to know that you are liking the series.
@muhmdayeshafatimamariarnge6968
2 жыл бұрын
@@sumitmittal07 request sir window functions and anaytical function , i mean with your series end result is cracking MANG . once series completed we should crack mang , refer Ankit Bansal youtube
@muhmdayeshafatimamariarnge6968
2 жыл бұрын
@@sumitmittal07 cte , stored proc as one one query we dont fire , sql execution plan and correcting performance , recursive queries in sql topic
@muhmdayeshafatimamariarnge6968
2 жыл бұрын
@@sumitmittal07 visit clever studies channel 6 concepts in one query mean prepare one doc where 6-7 concepts used together sql query like union + filter + recursive query + withclause + having you can vsit data is good youtube channel , clever studies sql list , cloudyml youtube , Ankit bansal the level is increased
Sumit Sir, really enjoyed this video a lot, I just know about CTE but not with CTE (column_1, column_2), this is super understandable. I would love to know how are you able to run the SQL query in VS code, please help me too. Thank you Sir. :)
Please launch more sessions for advance SQL as soon as possible sir..it's a request..I'm learning via your videos so desperately wait for your classes..
Nested queries concept is it important
Sir kindly provide the tables for practice it would help most of us for practice
thank you sir...next video when?
Hey dear, god bless your efforts in this channel. I have a general enquiry as a new sql learner. How could i create a pipeline to extract and load data from existing accounting program into our SQL server instances. How can i know if the export mechanism in the software permits me to undertake this extraction process, and how can i know if an application have an api? Thanks for taking care of my enquires. Looking forward to gain more knowledge from you.
Hello sir.Will you post videos on Data modelling concepts?
Sir please upload content faster btw the video is awesome
@sumitmittal07
2 жыл бұрын
Happy that you like the content. Will try to keep up the pace.
Really good
@sumitmittal07
2 жыл бұрын
Glad that you are liking it.
Can u make a video on Stored procedure
please create a video on fact and dimension , row and columnar data, transactional and time series database
Can you please share the create and insert syntax for this table?
sir leet code series and sql optimization as well
@sumitmittal07
2 жыл бұрын
Sure, noted.
We can use below subquery approach: select order_customer_id,count(*) as total_count from orders group by order_customer_id having total_count > (select avg(total_count) as average_count from (select order_customer_id,count(*) as total_count from orders group by order_customer_id) derivedtable) ; Can we use CTE on this ??
I'm happy to see Deepak Kalal teaching us SQL. Nice video though ❤️
It would have even better if data sources were also been shared.
Hello Sumit Sir, Just Now I have watched CTE Video. Its totally Understand to me. Can you please Create One another video for CTE for us.. Topic is "Parent - Child Category Concept" What I mean let say in a Category table there is 2 columns. 1. category_id (Primary key and Autoincrement) 2. parent_category_id (value of category_id) that means recursive query (nested). Example: Category Id Parent_category_id 1 0 2 0 3 1 4 1 5 2 6 3 7 1 8 0
which is the first video of this Advance video where worksheet is logged in. i can not work this in groom. please advice
Hi Sir, Can we write the below fashion for the premium customers (36:29) select order_customer_id from total_orders where total_orders_per_customer > (select avg_order_per_customer from average_orders) NOTE: Only to get the customer_id not the rest of the columns.
@ft_peakhd2921
Жыл бұрын
unless they've given us total_orders and average_orders tables in the data, we can't use the query you've written.
The orders table is from the retail_db database
The way I write SQL queries is to capitalize the commands and use lower case for the tables. That way it stays really clean. Just an opinion.
Pls take cursor classes
First one to like :)
can you provide table script....?
Hi sir, could you please cover stored procedures , functions, triggers ad well Else is their any paid course available let me know sir . Thanks in advance
Where CTE is stored? which approach is better?
First view
normalisation concept 🌚
Please share tables
My gap year is 5 years so can you help me to enter into it industry. My skill is oracle
Sir aap se lecture join karna chahte h
WITHOUT SHARING THE TABLE AND WITHOUT DOING IT PARALLELY IT BECOMES DIFFICULT TO FOLLOW AFTER A WHILE.
This Onecompiler doesnt work sir ... You should always put down sql scripts in comment box for ppl to practice paralelly .