In this video we will solve a LeetCode problem where we need to pivot the data from row to column. The interesting part about this problem is we don't have a common key to pivot the data on.
Script:
create table players_location
(
name varchar(20),
city varchar(20)
);
delete from players_location;
insert into players_location
values ('Sachin','Mumbai'),('Virat','Delhi') , ('Rahul','Bangalore'),('Rohit','Mumbai'),('Mayank','Bangalore');
#sql #dataengineer #pivot #dataengineers #sql #interview
Hi, this is Rajanikanth Gaja and I post videos on Computer Science related concepts, especially data-related technologies, these videos will help you in interviews as well as in clearing your theory and coding questions. If this channel helped you even a bit, please consider subscribing to the channel.
If you need any personal help in SQL, Mock interviews, or Coding help You can contact me at [email protected], Please note it will be charged.
Thank you :)
✨ Work-related E- emails can be sent to: [email protected]