LatentView Analytics Very Tricky SQL Interview Question | SQL Question for Data Engineering

preview_player
Показать описание
LatentView Analytics Very Tricky SQL Interview Question | SQL Question for Data Engineer

In this video, I will show you how I solved a very tricky SQL interview question asked to me by LatentView Analytics .

Input:

with data as (
select "A" as class, "Maths" as sub union all
select "B", "English" union all
select "A", "Social" union all
select "B", "Chemistry" union all
select "A","Physics" union all
select "B", "Statistics" union all
select "A", "Biology" union all
select "B", "Maths" union all
select "A", "Science" union all
select "B", "Social"
)

Output:
-- Class Sub1 Sub2 Sub3 Sub4 Sub5
-- A Science Physics Social Maths Biology
-- B English Social Maths Statistics Chemistry
Рекомендации по теме
Комментарии
Автор

Hi, nice approach to solve the problem without pivot. Can you please share more SQL problems asked n latent view company

rasikakurhade
visit shbcf.ru