Тёмный

SQL Interview Questions and Answers Series | HackerRank | TOP COMPTETITORS | Basic Join Statements 

Nishtha Nagar
Подписаться 2,8 тыс.
Просмотров 2,8 тыс.
50% 1

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@ashutoshgusain1149
@ashutoshgusain1149 Месяц назад
Hi Nishtha, Thank you for the solution. One thing i'd like to point out is, 2:16 you said that score are not the same for submission and challenges table. but then you use WHERE Clause. so if they are not same or equal, how it is giving result then? When you said score are different for both the tables, it means no matching values of score?
@mephisto2468
@mephisto2468 20 дней назад
How did this run correctly when on line 12 a . is used instead of a , ? Can you use a . for Order by or Group by instead of a ,?
@gargipathak5019
@gargipathak5019 3 месяца назад
VERY HELPFUL
@badrilalnagar9232
@badrilalnagar9232 3 месяца назад
It is a good way to give so students, who wants learn.
@zorawarmodi19
@zorawarmodi19 3 месяца назад
Doing great job Nishtha.
@madeehabalouch6648
@madeehabalouch6648 2 месяца назад
easy to understand, but takes way too much processing time!
@martn48
@martn48 Месяц назад
Thank you, guess I still have much to learn about joins, dont feel comfortable using that many. At first I tried using CTE's, didnt work for some reason so I had to use subquerys. Ashamed of my result but it worked 💀: SELECT Scores.hacker_id, h.name FROM (SELECT s.hacker_id, s.score as sub_score, cp.score as cp_score, CASE WHEN s.score = cp.score THEN 'yes' ELSE 'no' END AS is_max FROM Submissions s, (SELECT g.challenge_id, d.score FROM Challenges g JOIN Difficulty d ON d.difficulty_level = g.difficulty_level) cp WHERE s.challenge_id = cp.challenge_id) Scores JOIN Hackers h ON h.hacker_id = Scores.hacker_id WHERE is_max = 'yes' GROUP BY Scores.hacker_id, h.name HAVING COUNT(h.name)>1 ORDER BY COUNT(h.name) DESC, Scores.hacker_id ASC
Далее
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18
IBM SQL Interview Question | Using CTEs
16:08
Просмотров 2 тыс.
HackerRank | SQL | Top Competitors (Medium)
11:17
Просмотров 6 тыс.