Тёмный

SQL Interview Question - Solution (Part - VIII) |  

MeanLifeStudies
Подписаться 937
Просмотров 1,3 тыс.
50% 1

#education #sql #dataanalyst #dataengineers
Here are My profiles that will definitely help your preparation for data analyst or data engineer roles.
Medium: / mahendraee204
Github: github.com/mahendra204
Here are create and insert statements:
----------------------------------------------------------------
create table Sales (
Product varchar(10),
Region varchar(10),
Sales int
);
insert into Sales values
('A', 'North', 2000),
('A', 'South', 3000),
('A', 'East', 2400),
('B', 'North', 5000),
('B', 'South', 1000),
('B', 'East', 6000),
('C', 'North', 2500),
('C', 'South', 300),
('C', 'East', 4800),
('D', 'North', 1500),
('D', 'South', 2480),
('D', 'East', 2680);

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

 

22 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@user-ox4hs8if2y
@user-ox4hs8if2y Месяц назад
And then filter it out as noth and other regions
@jyotirdas6326
@jyotirdas6326 Месяц назад
Thankyou Sir for all your help🙂
@MeanLifeStudies
@MeanLifeStudies Месяц назад
Thanks for you. Considering watching my videos. I just started my youtube journey. I am moving slowly, started with SQL. There are lot more on the way. Keep supporting. Thank you :)
@jyotirdas6326
@jyotirdas6326 Месяц назад
@@MeanLifeStudies best of luck for your future endeavours
@MeanLifeStudies
@MeanLifeStudies Месяц назад
Thank you.
@user-ox4hs8if2y
@user-ox4hs8if2y Месяц назад
Sir canwr use the data in excel or bi and then transpose it
@MeanLifeStudies
@MeanLifeStudies Месяц назад
Yes. We can.
@dasubabuch1596
@dasubabuch1596 Месяц назад
Pivot:- ***** select * from ( select product,region,sales from sales )pivot(sum(sales) for Region in ('North' as North,'South' as South,'East' as East) ); Unpivot:- ******* Creating table: --------------- create table sales_Details as select * from ( select product,region,sales from sales )pivot(sum(sales) for Region in ('North' as North,'South' as South,'East' as East) ); select * from sales_Details; Unpivot the above table: ----------------------- select * from (select product,to_char(NORTH) as NORTH, to_char(SOUTH) as SOUTH, to_char(EAST) as EAST FROM sales_Details ) unpivot(column_Val for column_name in (NORTH,SOUTH,EAST));
Далее
NOOOOO 😂😂😂
00:15
Просмотров 4 млн
Что не так с воздухом в Корее?
00:45
What Does a Data Engineer ACTUALLY Do?
5:02
Просмотров 30 тыс.