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
Sur cette page du site, vous pouvez voir la vidéo en ligne SQL Cross Join | Use Cases | Master Data | Performance Data durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Ankit Bansal 09 mars 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 40,170 fois et il a aimé 1.2 mille téléspectateurs. Bon visionnage!