Occupations Medium – HackerRank Solution SQL, Best and Optimal Solutions , All you need.
Solutions of SQL all HackerRank:
Here are all the Solutions of All of SQL of Hacker Rank , Leave a comment for similar posts
SQL Occupations Medium HackerRank Solution
SELECT d.Name, p.Name, s.Name, a.Name FROM (SELECT Name, Row_number() over(order by name) as num FROM Occupations WHERE Occupation = 'Doctor') d full join (SELECT Name, Row_number() over(order by name) as num FROM Occupations WHERE Occupation = 'Professor') p on d.num = p.num full join (SELECT Name, Row_number() over(order by name) as num FROM Occupations WHERE Occupation = 'Singer') s on d.num = s.num or p.num = s.num full join (SELECT Name, Row_number() over(order by name) as num FROM Occupations WHERE Occupation = 'Actor') a on d.num = a.num or p.num = a.num or s.num = a.num
SQL (Basic)
SQL (Intermediate)
SQL (Advanced)
Basic Select
Advanced Select
Aggregation
Basic Join
Advanced Join
Alternative Queries
Leave a comment below