This video is the first part of our series on SQL interview questions and answers. This series is specifically designed for people targeting jobs as data analysts, data scientists, data engineers, and business analysts.
In this video, I have explained two methods to solve the given question using MySQL workbench.
Use the below the commands to create your own database and table:
CREATE DATABASE THEMLMINE;
USE THEMLMINE;
CREATE TABLE Employees(
ID INT NOT NULL PRIMARY KEY,
Name VARCHAR(20),
Salary INT
);
INSERT INTO Employees VALUES
(1, 'Somesh', 90000),
(2, 'Vinay', 70000),
(3, 'Hima', 75000),
(4, 'Prashant', 70000),
(5, 'Shivangi', 45000),
(6, 'Priya', 40000),
(7, 'Mohan', 95000);
You can download the final script from here:
https://drive.google.com/file/d/1bfqx...
Learn SQL from scratch: • SQL Tutorial for beginners | Part 1...
Instagram: / the_ml_mine
Timestamps:
00:00 Intro to series
00:12 Interview Question
00:39 Query using LIMIT and OFFSET
05:47 Query using DENSE_RANK
10:46 Summary
11:27 Outro
Intro music : Education upbeat positive (short ver.) by AudioCoffee https://freesound.org/s/724628/ License: Attribution NonCommercial 4.0