data analyst sql interview questions and answers #39/100 | Airbnb | SQL Tutorials | Recursive CTE

preview_player
Показать описание
Welcome to Day 39 of my 100 Days Challenge!

Join me as I walk through each problem step-by-step, providing detailed explanations and practical tips. Don't forget to like, subscribe, and hit the bell icon to stay updated with daily challenges!

Links:
GitHub Repository - Get the question & datasets

Best Data Analytics Course:

My Other YouTube Videos -
SQL 30 Days Road Map - [Free Learning Resources]

#SQL #DataAnalysis #PortfolioProject #DataCleaning #BusinessAnalysis #DataAnalyst #SQLProject #EDA #SQLTutorial #GitHub #DataScience #CareerInData #LearnSQL #SQLforDataAnalyst #AspiringDataAnalyst #ResumeProject #EndToEndProject
Рекомендации по теме
Комментарии
Автор

with cte as(
select MIN(customer_id) as min_id, MAX(customer_id) as max_id from Customers), cte1 as
( select min_id as id from cte
union all


select id+1 from cte1, cte where id<max_id)

select * from cte1
except
select customer_id from customers;

Soul-fv
Автор

Start Data Career in 2025 (Best Course)

zero_analyst
Автор

with recursive cte as (select min(customer_id) as mini
from customers
union all
select mini + 1 as mini
from cte
where mini < (select max(customer_id) from customers) and mini < 100
)

select mini
from cte
where mini not in (select customer_id from customers)

Chathur
Автор

select * from generate_series(1, 5) where value not in (select customer_id from Customers_Saturday)

gqcglsf
Автор

with recursive temp as
(
select 1 as id
union all
select id+1 as id
from temp
where id < (select max(customer_id) from customers_missing)
)
select t.id
from temp t
left join customers_missing c
on t.id = c.customer_id
where c.customer_id is null

MathanRJ-pc
Автор

declare @variable int;
set @variable = (Select max(customer_id) from customers);
with cte as
(
select min(customer_id) as num from Customers
union all
select num+1 as num from cte
where num < @variable
)
select a.num from cte a
left join customers b on a.num = b.customer_id
where b.customer_id is null

MusicalShorts-hnpx
Автор

with recursive cte as(
select min(customer_id) as n from customers
union all
select n+1 from cte where n<(select max(customer_id) from customers))
select * from cte where n not in (select customer_id from customers);
another approach

rishabhralli
Автор

SELECT value FROM GENERATE_SERIES(1, (SELECT MAX(customer_id) FROM Customers))
WHERE value NOT IN (SELECT customer_id FROM Customers);

theinsightminer
Автор

Bayya can you please shre the resume template

mulikinatisiddarthasiddu
join shbcf.ru