In this video we will discuss about SQL cross join and 2 of its use cases.
First use case is to produce master data for a fact table
second use case is when you want to generate large no of records for performance testing.
Zero to hero(Advance) SQL Aggregation:
• All About SQL Aggregations | SQL Advance |...
Most Asked Join Based Interview Question:
• Most Asked SQL JOIN based Interview Questi...
Solving 4 Trick SQL problems:
• Solving 4 Tricky SQL Problems
Data Analyst Spotify Case Study:
• Data Analyst Spotify Case Study | SQL Inte...
Top 10 SQL interview Questions:
• Top 10 SQL interview Questions and Answers...
Interview Question based on FULL OUTER JOIN:
• SQL Interview Question Based on Full Outer...
Playlist to master SQL :
• Complex SQL Questions for Interview Prepar...
Rank, Dense_Rank and Row_Number:
• RANK, DENSE_RANK, ROW_NUMBER SQL Analytica...
Here are the scripts of tables used:
create table products (
id int,
name varchar(10)
);
insert into products VALUES
(1, 'A'),
(2, 'B'),
(3, 'C'),
(4, 'D'),
(5, 'E');
create table colors (
color_id int,
color varchar(50)
);
insert into colors values (1,'Blue'),(2,'Green'),(3,'Orange');
create table sizes
(
size_id int,
size varchar(10)
);
insert into sizes values (1,'M'),(2,'L'),(3,'XL');
create table transactions
(
order_id int,
product_name varchar(20),
color varchar(10),
size varchar(10),
amount int
);
insert into transactions values (1,'A','Blue','L',300),(2,'B','Blue','XL',150),(3,'B','Green','L',250),(4,'C','Blue','L',250),
(5,'E','Green','L',270),(6,'D','Orange','L',200),(7,'D','Green','M',250);
#sql #crossjoin #analytics
On this page of the site you can watch the video online SQL Cross Join | Use Cases | Master Data | Performance Data with a duration of hours minute second in good quality, which was uploaded by the user Ankit Bansal 09 March 2022, share the link with friends and acquaintances, this video has already been watched 40,170 times on youtube and it was liked by 1.2 thousand viewers. Enjoy your viewing!