#22 Occupations | HackerRank SQL Solutions

  Рет қаралды 20,214

DEV19

DEV19

Күн бұрын

Пікірлер: 25
@kiranvenkat7909
@kiranvenkat7909 2 жыл бұрын
Of all the videos out there about this problem, you are the one who explained it clearly. Great job. Do more such videos.
@UrbanForrest95
@UrbanForrest95 2 жыл бұрын
This is well explained out of all the videos available on KZbin for this particular problem, Thanks
@antibioticsOfWorld
@antibioticsOfWorld 2 жыл бұрын
literally, u r the only one who has explained ...rest of them have just read the code as it is ..well done
@rishiraj1028
@rishiraj1028 2 жыл бұрын
SELECT MAX(IF(OCCUPATION = 'DOCTOR',NAME, NULL)) AS DOCTOR, min(IF(OCCUPATION ='PROFESSOR',NAME, NULL)) AS PROFESSOR, MIN(IF(OCCUPATION = 'SINGER',NAME, NULL)) AS SINGER, max(IF(OCCUPATION = 'ACTOR',NAME, NULL)) AS ACTOR FROM (SELECT NAME, OCCUPATION, Row_number() Over(PARTITION BY occupation ORDER BY name)as row_num FROM occupations) as ord group by row_num
@Stayin_delulu_is_the_soluluu_
@Stayin_delulu_is_the_soluluu_ Жыл бұрын
as ord (before group by) last line mein kyun ?
@mrinalbisht4212
@mrinalbisht4212 Жыл бұрын
@@Stayin_delulu_is_the_soluluu_ to declare as a temp TABLE with name ord, which we used further
@katerirakim3690
@katerirakim3690 2 жыл бұрын
wonderful explanation ! well understood especially how min and max function works in here thx!!!
@dev.19.community
@dev.19.community 2 жыл бұрын
Great to hear!
@Mustafa-099
@Mustafa-099 2 жыл бұрын
Why are we using the aggregate function Min() for each of the if condition for occupations?
@DSCHsaxen
@DSCHsaxen 11 ай бұрын
to use group by we have to make it compulsory to use an agrregate function while selecting
@sanskarkurude
@sanskarkurude 7 ай бұрын
very nice explanation bro
@sahilmothsara8641
@sahilmothsara8641 Жыл бұрын
Good work broo....keep it up.....try to use language in which you are more comfortable....just a suggestion
@ishasingh9906
@ishasingh9906 8 ай бұрын
Why max function is not returning the maximum row_number ?
@satyadharkumarchintagunta3793
@satyadharkumarchintagunta3793 2 жыл бұрын
So well explained!!!!!!!Thank You
@muskanmamta4347
@muskanmamta4347 2 жыл бұрын
wonderfull
@MinChitXD
@MinChitXD Жыл бұрын
Your video saves my day, I spent 5hrs working on this one in my university and your video explains exacltly in the way I understood it. Btw, I want to ask for the MIN and MAX function in this case, it is just there because we are using the groupby function and it doesn't have any effect, right? ❤❤
@dev.19.community
@dev.19.community Жыл бұрын
Without GroupBy also we can use min max , no issue
@cyber_dbs
@cyber_dbs Жыл бұрын
CREATE VIEW repeatedQ AS select name, occupation, row_number() over (PARTITION BY occupation order by name) as rowNo from occupations; select (select name from repeatedQ as r2 where occupation = 'Doctor' and r2.rowNo = r1.rowNo) as Doctor, (select name from repeatedQ as r2 where occupation = 'Professor' and r2.rowNo = r1.rowNo) as Professor, (select name from repeatedQ as r2 where occupation = 'Singer' and r2.rowNo = r1.rowNo) as Singer, (select name from repeatedQ as r2 where occupation = 'Actor' and r2.rowNo = r1.rowNo) as Actor from repeatedQ as r1 group by rowNo;
@akshatchaurasia1079
@akshatchaurasia1079 Жыл бұрын
Very helpful
@souravpramanik6740
@souravpramanik6740 Жыл бұрын
thank you very much.....❤
@vaibhavsrivastava7945
@vaibhavsrivastava7945 Жыл бұрын
Thankyou bro it helped me
@HazeulHajar
@HazeulHajar Жыл бұрын
thank you so much
@mdhalima5682
@mdhalima5682 Жыл бұрын
thankyou sooo much
@ravikantchauhan2106
@ravikantchauhan2106 2 жыл бұрын
I searched and try a lot of video but ultimately here my mission get completed... just a fantastic video..
@Sattya998
@Sattya998 Жыл бұрын
❤❤❤❤❤❤❤❤❤❤❤❤❤❤
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
OCCUPATIONS Problem Hackerrank SQL Solutions Medium
11:13
The Coding Mentor
Рет қаралды 12 М.
Querying 100 Billion Rows using SQL, 7 TB in a single table
9:07
Arpit Agrawal (Elastiq.AI)
Рет қаралды 58 М.
Occupations | SQL Advanced Select | HackerRank Solution
11:56
Tech World Software School
Рет қаралды 5 М.
HackerRank - Solve Occupations using Sql Server PIVOT command
4:18
Software Nuggets
Рет қаралды 1,6 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 242 М.