No video

SQL Interview Question - Solution (Part - VIII) |

  Рет қаралды 1,434

MeanLifeStudies

MeanLifeStudies

Күн бұрын

#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/mah...
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);

Пікірлер: 9
@MubarakAli-qs9qq
@MubarakAli-qs9qq 4 күн бұрын
Uniqu questios u have dude
@jyotirdas6326
@jyotirdas6326 2 ай бұрын
Thankyou Sir for all your help🙂
@MeanLifeStudies
@MeanLifeStudies 2 ай бұрын
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 2 ай бұрын
@@MeanLifeStudies best of luck for your future endeavours
@MeanLifeStudies
@MeanLifeStudies 2 ай бұрын
Thank you.
@user-ox4hs8if2y
@user-ox4hs8if2y 2 ай бұрын
And then filter it out as noth and other regions
@dasubabuch1596
@dasubabuch1596 2 ай бұрын
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));
@user-ox4hs8if2y
@user-ox4hs8if2y 2 ай бұрын
Sir canwr use the data in excel or bi and then transpose it
@MeanLifeStudies
@MeanLifeStudies 2 ай бұрын
Yes. We can.
娜美这是在浪费食物 #路飞#海贼王
00:20
路飞与唐舞桐
Рет қаралды 3,9 МЛН
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 20 МЛН
wow so cute 🥰
00:20
dednahype
Рет қаралды 30 МЛН
Learn SQL + Database Concepts in 20 Minutes
24:34
Chandoo
Рет қаралды 51 М.
娜美这是在浪费食物 #路飞#海贼王
00:20
路飞与唐舞桐
Рет қаралды 3,9 МЛН