CTE s IN SQL | Advanced SQL | Ashutosh Kumar

preview_player
Показать описание
Sql one of the most important language asked in most of the analytics interviews,in this series i have discussed some advanced level sql concepts that are frequently asked in data analyst,business analyst interviews. In this video i have covered non equi joins concepts in sql

👉Query -

drop table if exists order_summary;
CREATE TABLE order_summary(orderid integer,amount integer,quantity integer);

INSERT INTO order_summary(orderid,amount,quantity)
VALUES (1,4922,8),
(2,7116,8),
(3,1206,4),

(4,2841,7),
(5,2522,2),
(6,5084,3),
(7,6680,4),
(8,8123,7),
(9,6015,2),
(10,4092,3),
(11,7224,2),
(12,7679,8),
(13,1303,2),
(14,5185,7),
(15,2139,8);

drop table if exists customer;
CREATE TABLE customer(cust_id integer,cust_first_name text,cust_last_name text);

INSERT INTO customer(cust_id,cust_first_name,cust_last_name)
VALUES (1,'Henry','Brown'),
(2,'James','Williams'),
(3,'Jack','Taylor');

drop table if exists orders;
CREATE TABLE orders(order_id integer,date date,cust_id integer);

INSERT INTO orders(order_id,date,cust_id)
VALUES
(1,'05-08-2020',1),
(2,'04-08-2020',2),
(3,'03-08-2020',3),
(4,'04-08-2020',1),
(5,'05-08-2020',2),
(6,'05-08-2021',3),
(7,'04-08-2021',1),
(8,'03-08-2021',2),
(9,'04-08-2021',3),
(10,'05-08-2021',2),
(11,'05-08-2022',1),
(12,'04-08-2022',2),
(13,'03-08-2022',3),
(14,'04-08-2022',1),
(15,'05-08-2022',2);

select * from orders;
select * from order_summary;
select * from customer;

👉 Complete playlist on Sql Interview questions and answers

---------------------------------------------------------------------------------------------------------------------
Check out some more relevant content here

👉 How to Learn SQL

👉 How to become a business analyst complete roadmap-

👉 How to become a data analyst complete roadmap-

👉 Top 3 you tube channels to learn sql for free for beginners

👉 Rank ,Dense Rank, Row Number in sql -

👉 Cross join in sql

👉 union join in sql

👉 left join in sql

👉 Right join in sql

👉 Inner join in sql

👉 Introduction to tables and databases in sql -

👉 Aggregate Function in sql

👉 Functions in sql-

👉 String Function in sql

👉 CRUD operations in sql

👉 Autoincrement in sql

👉 Primary Key in sql-

👉 Null and Default values in sql-

👉 Data types in sql-

____________________________________________________________________

_______________________________________________________________________
Connect with me

_____________________________________________________________________

Comment down if you have any doubts
Please leave a LIKE 👍 and SUBSCRIBE ❤️ to my channel to receive more amazing content in data analytics and data science.

_____________________________________________________________________

🏷️ Tags

sql,
sql for data science,
sql for data analytics,
sql practise questions,
sql practise questions and solutions,
sql tutorials for beginners,
sql problems for data engineers,
ashutosh,
ashutosh kumar,
ashutosh kumar analytics,
sql problems easy,
sql problem medium,
sql problems hard,
sql window functions,
sql advanced questions,
rank functions in sql,
lag lead in sql,
sql interview questions and answers,
sql interview questions,
sql questions asked in interviews,
hackerrank sql solutions,
hackerearth sql solutions,
leetcode sql solution

🏷️HashTags

#sql #interviews #questions #solutions
Рекомендации по теме
Комментарии
Автор

Awesome tutorial on cte, concise and crystal clear. It was a bit frustrating for me working in sql and not being able to chain the results or save the objects to be reused. From now on, after your cte tutorial, it will be more funny and pleasant working with sql as never before.
For greater readibility, I would like to suggest you to consider some formatting or beautifying your code, specially your inner inner query/the derived table from the first join
Keep it up Sir, you are a legend!

osoriomatucurane
Автор

Patiently and Detailed Explanation. Please make a video on Dynamic SQL as well

shrutibajaj
Автор

you are one of the best teachers on youtube just a request to make videos in hindi as well

prashantvarun
Автор

Did u know we love ur teaching and content

mezomezo
Автор

Teaching and content quality is best, but less views Keep doing it bro

sachinmm
Автор

Can you provide video for indexing as well

priyanshitiwari
Автор

sir me Excel, SQL and Power Bi sikna complete kiya he lekin job nahi mil rahi he 😢 keya karo

ashirbadmajumder
Автор

Hello Ashutosh,
I want to know whether the Syntax of this advance SQL tutorials will be same for MySQL as well?
Please reply.
Thanks in Advance.

anandjain
Автор

Bro can i use mongo db campus for data analytics jobss or i have to do it with other language means who will get more preferrence
And one more ques ...
Are you doing any job r8 now ??

ayushbhardwaj