Learn how to write SQL Queries(Practice Complex SQL Queries)
techTFQ techTFQ
283K subscribers
1,438,514 views
0

 Published On Aug 22, 2021

Learn how to write SQL Queries(Practice Complex SQL Queries)
In this video, I will explain the thinking behind writing an SQL query. We shall go through five different complex SQL queries and try to solve it. The intention is to practice complex SQL queries. The idea is to not just write SQL Queries but also to explain you the thinking behind how to choose a particular approach to solve a SQL query and how to choose different SQL functions or concepts to solve a problem.

Link to my blog where I have posted all of these SQL Queries:
https://techtfq.com/blog/learn-how-to...

In this blog, you will find 9 SQL queries along with all the scripts to create the table, load data into these tables and also the solved SQL Queries. Out of these 9 SQL Queries, In this video, I have only solved 5 of them in order to reduce the video length.

Timeline:
00:00 Intro
01:36 Intro about the blog
03:25 SQL Query to fetch duplicate records from a table using window function
09:27 SQL Query to fetch doctors working in same hospital using self join
15:55 SQL Query to fetch users who logged in consecutively 3 or more times
25:10 SQL Query to fetch days when the temperature was very cold for consecutively 3 or more days
36:13 SQL Query to fetch top 2 accounts with maximum patients per month

Learning SQL Concepts and practically writing SQL queries are two different things. You may be familiar with the concept such as window function but until and unless you apply these concepts to write SQL queries, you will never truly understand SQL.

May of the queries I am going to solve in this video, I will be using window function such as LEAD, LAG, RANK, ROW_NUMBER etc. However, some of the queries are solved using self join, sub queries or inner joins.

The idea behind making this video, is to explain the thinking behind solving an SQL question. How to read the question and understand the problem statement and then analyze the existing data so that we can come up with an approach to write a query which can return the required result. These steps are very important in order for us to determine the different SQL concepts or functions to be used to solve the problem.

Please comment below your feedback if you liked this kind of video or if you have any doubts on any other queries mentioned in the blog.

🔴 WATCH MORE VIDEOS HERE 👇

âś… SQL Tutorial - Basic concepts:
   • SQL Tutorial - Basic concepts  

âś… SQL Tutorial - Intermediate concepts:
   • SQL Tutorial - Intermediate concepts  

âś… SQL Tutorial - Advance concepts:
   • SQL Tutorial - Advance concepts  

âś… Practice Solving Basic SQL Queries:
   • Practice Solving BASIC SQL Queries  

âś… Practice Solving Intermediate SQL Queries:
   • Practice Solving INTERMEDIATE SQL Que...  

âś… Practice Solving Complex SQL Queries:
   • Practice Solving COMPLEX SQL Queries  

âś… Data Analytics Career guidance:
   • Data Analytics career and more  

âś… SQL Course, SQL Training Platform Recommendations:
   • SQL Course / Training  

âś… Python Tutorial:
   • Python Tutorial  

âś… Git and GitHub Tutorial:
   • Git and GitHub  

âś… Data Analytics Projects:
   • Data Analytics Projects  

THANK YOU,
Thoufiq

show more

Share/Embed