select name [Professor],Row_number() over(order by name) [id] from OccuPATIONS where Occupation='Professor' ) as f left join ( select name [Actor],Row_number() over ...
Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output should consist of four columns (Doctor, ...
Getting good at SQL for interviews can feel like a puzzle. You know the basics, but putting them together in a way that impresses people is another thing entirely. Luckily, there are great tools out ...