Practice Complex SQL Queries | SQL Query to fetch N consecutive records

Practice Complex SQL Queries | SQL Query to fetch N consecutive records

Practice Complex SQL Queries | SQL Query to fetch N consecutive records
In this video, I explain how to write a complex SQL query which is to fetch N consecutive records from a table based on some condition. We see how to write a generic SQL Query to fetch any number of consecutive records from a table.
We see 3 different variations of writing this query:
1) How to write this query when the table has a primary key column
2) How to write this query when the table DOES NOT have a primary key column
3) How to write this query based on Date field value.

All the queries and scripts mentioned in this video are posted on my blog. You can download them for free from below link:
https://techtfq.com/blog/learn-how-to-write-sql-queries-practice-complex-sql-queries

Timestamp:
00:00 Intro
01:08 SQL Query to fetch N consecutive records from a table which has a primary key
14:52 SQL Query to fetch N consecutive records from a table which does not have a primary key
18:46 SQL Query to fetch N consecutive records from a table based on date field

More video's:
SQL Beginners Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9GcaqGycSvnV8lfQLud6B_z

SQL Advance Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9GTiYtgpkhpK9GPx-r-JvSN

Python Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9HIQOecVQRkuiFagBoyKV6z

Python Beginner Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9HCszaJvlXTvMgMUO6WEhrP

Git and GitHub Tutorial:
https://www.youtube.com/playlist?list=PLavw5C92dz9EI1MPlqqDpe3bgr8RJZE0b

THANK YOU

SQLSQL TutorialSQL Queries

Post a Comment

0 Comments