YOUR AD GOES HERE

Advanced SQL Query - 3 | TCS Interview Question | GROUP BY

Published 07, Jun 2023

Shreyas


Description:
Script for creating Table:

drop table customers, orders
create table customers ( customer_id int, customer_name varchar(20), contact varchar(12), primary key (customer_id) );

insert into customers values(9011,'Shashank','94856*****');
insert into customers values(9012,'Rahul','87159*****');
insert into customers values(9013,'Ajay','98236*****');
insert into customers values(9014,'Nitin','78562*****');
insert into customers values(9015,'Naveen','86423*****');

create table orders ( order_id int, customer_id int, amount float, status varchar(20), primary key (order_id) );

insert into orders values(1,9011,550,'Cancelled');
insert into orders values(2,9012,580,'Delivered');
insert into orders values(3,9011,280,'Cancelled');
insert into orders values(4,9013,610,'Cancelled');
insert into orders values(5,9013,800,'Cancelled');
insert into orders values(6,9014,980,'Delivered');
insert into orders values(7,9015,100,'Cancelled');
insert into orders values(8,9013,500,'Cancelled');

select * from customers
select * from orders


Advanced SQL queries for Interview: https://www.youtube.com/playlist?list=PLAaA_0PIwr0DZqwrzbOOTjVADWKjSxfMU

Releted More Videos

  • Sorry!!! Nothing to show

You May Also Like

YOUR AD GOES HERE

YOUR AD GOES HERE