filmov
tv
Complex SQL 2 | find new and repeat customers | SQL Interview Questions
Показать описание
This video is about finding new and repeat customers .using SQL. In this video we will learn following concepts:
how to approach complex query step by step
how to use CASE WHEN with SUM
how to use common table expression (CTE)
Here is the script :
create table customer_orders (
order_id integer,
customer_id integer,
order_date date,
order_amount integer
);
select * from customer_orders
insert into customer_orders values(1,100,cast('2022-01-01' as date),2000),(2,200,cast('2022-01-01' as date),2500),(3,300,cast('2022-01-01' as date),2100)
,(4,100,cast('2022-01-02' as date),2000),(5,400,cast('2022-01-02' as date),2200),(6,500,cast('2022-01-02' as date),2700)
,(7,100,cast('2022-01-03' as date),3000),(8,400,cast('2022-01-03' as date),1000),(9,600,cast('2022-01-03' as date),3000)
;
how to approach complex query step by step
how to use CASE WHEN with SUM
how to use common table expression (CTE)
Here is the script :
create table customer_orders (
order_id integer,
customer_id integer,
order_date date,
order_amount integer
);
select * from customer_orders
insert into customer_orders values(1,100,cast('2022-01-01' as date),2000),(2,200,cast('2022-01-01' as date),2500),(3,300,cast('2022-01-01' as date),2100)
,(4,100,cast('2022-01-02' as date),2000),(5,400,cast('2022-01-02' as date),2200),(6,500,cast('2022-01-02' as date),2700)
,(7,100,cast('2022-01-03' as date),3000),(8,400,cast('2022-01-03' as date),1000),(9,600,cast('2022-01-03' as date),3000)
;
Complex SQL 2 | find new and repeat customers | SQL Interview Questions
Learn how to write SQL Queries(Practice Complex SQL Queries)
Approach to Complex SQL Queries
Advanced SQL Tutorial | Subqueries
Secret To Optimizing SQL Queries - Understand The SQL Execution Order
Top 10 SQL Interview Queries | Popular SQL Queries for SQL Interview
Complex SQL Query Breakdown Step By Step
SOLVE 5 SQL QUERIES IN 5 MINUTES (PART 1) | MASTER IN SQL | SQL INTERVIEW QUESTIONS
Use plain english to generate SQL code in Amazon Redshift w/ Amazon Q Developer
Advanced Aggregate Functions in SQL (GROUP BY, HAVING vs. WHERE)
An Awesome Tricky SQL Logic | Complex SQL 10
Complex SQL Query 1 | Derive Points table for ICC tournament
Practice Complex SQL Queries | SQL Query to fetch N consecutive records
Complex SQL Breakdown (CTEs, Subquery, and More)
SQL JOINS Interview Question | What does different SQL Joins return?
HOW TO JOIN 3 OR MORE TABLES IN SQL | TWO WAYS
6 SQL Joins you MUST know! (Animated + Practice)
Subquery in SQL | Correlated Subquery + Complete SQL Subqueries Tutorial
Advanced SQL Tutorial | Stored Procedures + Use Cases
REAL SQL Interview Question | Complex SQL Interview Query and Solution
SQL Server Tutorial - One-to-many and many-to-many table relationships
SQL Query Optimization - Tips for More Efficient Queries
Solving a Complex SQL Interview Problem | Find the Most Modified File Extension
Learn & Practice SQL Complex Queries | 10 examples (Must DO for Interviews)
Комментарии