SQL Interview Query | How many times does a number occur consecutively | Leetcode | Consecutive Nums
HTML-код
- Опубликовано: 28 авг 2022
- In this tutorial, we discuss how to write a SQL Query to find the number of times a number occurs consecutively.
We also discuss the approach to the leetcode problem on Consecutive numbers.
The SQL statements are available at the below link -
know-star.blogspot.com/2022/0...
How to install SQL Server for practice?
• How to install SQL Ser...
Check out the complete list of SQL Query Interview Questions -
• SQL Query Interview Qu...
Best Data Science / Analytics / SQL courses
Learn SQL Basics for Data Science Specialization
imp.i384100.net/qnXYk5
Data Science Fundamentals with Python and SQL Specialization
imp.i384100.net/mgVYre
Python for Everybody Specialization
imp.i384100.net/DVz7Aj
Google Data Analytics Professional Certificate
imp.i384100.net/OR37oQ
Coursera Plus - Data Science Career Skills
imp.i384100.net/c/3299742/132...
Please do not forget to like, subscribe and share.
For enrolling and enquiries, please contact us at
Website - knowstar.org/
Instagram - / learn.knowstar
Facebook - / knowstartrainings
Linkedin - www.linkedin.com/company/know...
Email - learn@knowstar.org
Very thoroughly explained. Looking forward to more complex SQL Queries from you.
Glad it was helpful 🙏
Very useful. Thanks for the relevant content.
Thank you 🙏
shish, i was serching solution with good explanation for 3 days. THANK YOU VERY MUCH
Glad it helped!
Another amazing video. Thanks again.
Thank you 🙏
Thank you, Miss. good job! Your solution is very clear and concise!
Glad it was helpful 🙏
Hey there, glad to meet again with a simple enquiry.
I learned that a recursive stored condition may cause crash of sql application as this kind of procedure will keep calling by itself until a
condition is met?
What is a good practice to handle these procedures?
Thanks a lot.
Very useful tips that are applicable in the real world, thanks
Glad it was helpful 🙏
Excellent explanation
Thank you
Question. Do you really need the additional num field on the group clause?
Not really needed 👍
drop table login_details;
create table login_details(
login_id int primary key,
user_name varchar(50) not null,
login_date date);
delete from login_details;
insert into login_details values
(101, 'Michael', current_date),
(102, 'James', current_date),
(103, 'Stewart', current_date+1),
(104, 'Stewart', current_date+1),
(105, 'Stewart', current_date+1),
(106, 'Michael', current_date+2),
(107, 'Michael', current_date+2),
(108, 'Stewart', current_date+3),
(109, 'Stewart', current_date+3),
(110, 'James', current_date+4),
(111, 'James', current_date+4),
(112, 'James', current_date+5),
(113, 'James', current_date+6);
same logic for this input is not working