0% found this document useful (0 votes)
10 views5 pages

Advanced SQL

The document outlines various data analysis techniques and concepts used in a Data Detective Club, including window functions, data cleaning methods, business aggregation strategies, joins and subqueries, and advanced analytics. Key topics include calculating top salaries, running totals, revenue by month, and cohort analysis. Each section provides a brief overview of specific analytical tasks and methodologies.

Uploaded by

danielnascirocha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Advanced SQL

The document outlines various data analysis techniques and concepts used in a Data Detective Club, including window functions, data cleaning methods, business aggregation strategies, joins and subqueries, and advanced analytics. Key topics include calculating top salaries, running totals, revenue by month, and cohort analysis. Each section provides a brief overview of specific analytical tasks and methodologies.

Uploaded by

danielnascirocha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DATA DETECTIVE CLUB

Window Functions -

Top N salary per department


Running total of daily revenue
Rank customers by lifetime
spend
Find longest gap between
orders
Previous vs current value
comparison

NEXT
DATA DETECTIVE CLUB

Data Cleaning -

Remove duplicates keeping


latest record
Find duplicate emails
Detect missing dates
Replace NULL with meaningful
values
Identify inconsistent records

NEXT
DATA DETECTIVE CLUB

Business Aggregation -

Revenue by month & region


Conditional aggregation
(multiple KPIs)
Average order value per
customer
Customers with zero
purchases
Top products by category

NEXT
DATA DETECTIVE CLUB

Joins + Subqueries -

Customers who never ordered


Products never sold
Self join (manager–employee)
EXISTS vs IN scenario
Anti join pattern

NEXT
DATA DETECTIVE CLUB

Advanced Analytics -

Cohort analysis (monthly


retention)
Funnel analysis
Sessionization problem
Rolling 7-day average
Churn detection logic

NEXT

You might also like