SQL Interview questions | Data Analyst | Part - 1

  Рет қаралды 3,685

The ML Mine

The ML Mine

Күн бұрын

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:
drive.google.com/file/d/1bfqx...
Learn SQL from scratch: • SQL Tutorial for begin...
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 -- freesound.org/s/724628/ -- License: Attribution NonCommercial 4.0

Пікірлер: 22
@TheMLMine
@TheMLMine Ай бұрын
If you know SQL questions that were asked in any job interview, do write them in comments. If popular, I will make a solution video on the same 😊
@Pragya3421
@Pragya3421 Ай бұрын
This is the best explanation I have ever seen without complicating the thing. Even a beginner can understand the functions of '"LIMIT, OFFSET, DENSE_RNK, RNK" etc.
@TheMLMine
@TheMLMine Ай бұрын
Thank you Pragya
@karthipalanivel6345
@karthipalanivel6345 2 сағат бұрын
Please explain mssql also while explining the mysql querys
@hamudxd9497
@hamudxd9497 24 күн бұрын
GOOD❤
@apurvabomle8606
@apurvabomle8606 24 күн бұрын
Wonderful explanation 😊keep it up✌️
@TheMLMine
@TheMLMine 23 күн бұрын
Thanks apurva
@dharmajakrishnakunche5692
@dharmajakrishnakunche5692 29 күн бұрын
This is the most concise as well as detailed explanation to the question!! You deserve more likes and subs!!!! And trust me this my second time commenting of KZfaq ever!! Thought your explanation is crisp and clear!! Also Please cover topics like stored procedures, indexing, normalisation etc!! Would really appreciate!! Thank you!! Keep up the good work!!!
@TheMLMine
@TheMLMine 28 күн бұрын
Thank you. Glad to hear. Sure, I will try to cover these topics in a separate video.
@sweetsubha514
@sweetsubha514 Ай бұрын
Wow the way you explained 👌..Thank you so much... very informative... And please make a video on MySQL index,stored procedure, views & remove duplicates and also joins (queries)
@TheMLMine
@TheMLMine Ай бұрын
Thanks subha. I will try to cover that in future.
@Pragya3421
@Pragya3421 Ай бұрын
So, in case of Dense_rank, we don't need to use the "distinct" command for repeated salary? Why so?
@TheMLMine
@TheMLMine Ай бұрын
Correct. You need to understand that when we used LIMIT with OFFSET. The duplicate salaries were counted as two separate instances while counting with OFFSET command. Ideally, the salary of Vinay and Prashant should be counted as one which is the 4th highest salary (not 4th and 5th highest salary). To avoid that we used DISTINCT, so that only unique salaries are provided to the OFFSET command (to overcome its above discussed limitation). While in DENSE_RANK we don't have such issue. It automatically provided the same rank to Vinay and Prashant, indicating that the two rows are counted as single instance (unlike OFFSET). So, we don't need to use DISTINCT command here. Hope it answers your question !
@rokithkumar4905
@rokithkumar4905 Ай бұрын
Great 👍🏻 but what abt pandas tutorial part-3 😢
@TheMLMine
@TheMLMine Ай бұрын
Hi Rokith, are there any specific topics in the pandas tutorial that you think were important and were not covered? Let me know
@raviyadav-dt1tb
@raviyadav-dt1tb 24 күн бұрын
I’m facing more challenges in sql how to overcome it? Please help me
@TheMLMine
@TheMLMine 24 күн бұрын
Hey Ravi, could you please explain what challenges you are facing in SQL?
@raviyadav-dt1tb
@raviyadav-dt1tb 24 күн бұрын
@@TheMLMine thank you bro i mean to say I’m weak in sql query because in interviews most of the time I got rejected due to only sql query
@TheMLMine
@TheMLMine 23 күн бұрын
Even in my case as well, I got rejected a few times just because of SQL queries. What I did is - There are SQL questions that are asked in interviews and are standard. Try to solve all of them. Watch SQL interview questions from different KZfaq channels as well. It will increase the probability of solving questions in your next interview. - Don't just see the solution, but understand the approach. Ask questions like what would happen If I used this command instead of that and spend some time with the solution. It will develop your thinking pattern for solving new problems. - Trust your capabilities, you can crack the interview only if you believe that you can do it. Stick to it. I know you will get through it as well.
@fahadhussain9824
@fahadhussain9824 9 күн бұрын
@@TheMLMine Bro you give great tip on how to think and approach the problem you are the one who can give these kind of tips no other youtuber or even any person had gave that kind of high quality tips and knowledge Plz share more of your tips that how you can Plz give us more tips on how to improve our logical and critical thinking and Thankyu
@himanisrivastava1800
@himanisrivastava1800 8 күн бұрын
1K SUBSCRIBERS
@TheMLMine
@TheMLMine 8 күн бұрын
Thanks. And you are the 1000th subscriber
SQL Interview questions | Data Analyst | Part - 2
12:59
The ML Mine
Рет қаралды 1,9 М.
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 120 МЛН
Хотите поиграть в такую?😄
00:16
МЯТНАЯ ФАНТА
Рет қаралды 2,5 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 6 МЛН
Prepare these questions before your interview !
26:30
The ML Mine
Рет қаралды 789
SQL Interview questions | Data Analyst | Part - 3
15:29
The ML Mine
Рет қаралды 2,8 М.
SQL Interview Problem asked during Amazon Interview
15:15
techTFQ
Рет қаралды 16 М.
'Vampire Bella Attacks Jacob' Scene | The Twilight Saga: Breaking Dawn - Part 2
4:47
I learned SQL for data analytics in 15 days | From Scratch
4:10
Techie Saumya
Рет қаралды 475 М.
Fresher Mock Interview SQL | Technical Round | SQL Interview for Fresher | HR Interview
14:50
Lotus IT Hub training institute
Рет қаралды 36 М.
The 25 SQL Questions You MUST Know for Data Analyst Interviews
32:47
KSR Datavizon
Рет қаралды 198 М.