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-write-sql-queries-practice-complex-sql-queries
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:
https://www.youtube.com/playlist?list=PLavw5C92dz9HQQ_COgGb7kf_1H8UWUBxO
/>
âś… SQL Tutorial – Intermediate concepts:
https://www.youtube.com/playlist?list=PLavw5C92dz9FD9XspliRM_HZM_jK7tkii
/>
âś… SQL Tutorial – Advance concepts:
https://www.youtube.com/playlist?list=PLavw5C92dz9GbmgiW4TWVnxhjMFOIf0Q7
/>
âś… Practice Solving Basic SQL Queries:
https://www.youtube.com/playlist?list=PLavw5C92dz9F66P3GFo5O6nJ4DfZNhVsp
/>
âś… Practice Solving Intermediate SQL Queries:
https://www.youtube.com/playlist?list=PLavw5C92dz9EIYmNXJ8ZtQ1bmLIpt0SpV
/>
âś… Practice Solving Complex SQL Queries:
https://www.youtube.com/playlist?list=PLavw5C92dz9Fahr7taauUx5RnTfuGyL–
/>
âś… Data Analytics Career guidance:
https://www.youtube.com/playlist?list=PLavw5C92dz9FDsr995DjwCy9XNaIukb8P
/>
âś… SQL Course, SQL Training Platform Recommendations:
https://www.youtube.com/playlist?list=PLavw5C92dz9GqF1Q_zn8KnYvFgtEOh-2n
/>
âś… Python Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9FePZXIo4jpsupqp3X0w2SW
/>
âś… Git and GitHub Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9EI1MPlqqDpe3bgr8RJZE0b
/>
âś… Data Analytics Projects:
https://www.youtube.com/playlist?list=PLavw5C92dz9HwT_uStsDdJbuBOt_XD0ch
/>
THANK YOU,
Thoufiq