|
1 | | -# SQL-Advance-Data-Analytics-Project-by-using-CTE-and-Window-Functions |
2 | | -SQL Advance Data Analytics Project by using CTE and Window Functions |
| 1 | +# SQL Advance Data Analytics Project by using CTE and Window Functions |
| 2 | + |
| 3 | +SQLQuery-1. Analyze the yearly performance of products by comparing their sales to both the average sales performance of the product and the previous year's sales. |
| 4 | + |
| 5 | +SQLQuery-2. Segment products into cost ranges and count how many products fall into each segment. |
| 6 | + |
| 7 | +SQLQuery-3. Which Categories contribute the most to overall sales? |
| 8 | + |
| 9 | +SQLQuery-4. Group customers into three segments based on their spending behaviours: |
| 10 | + |
| 11 | + -VIP : Customers with at least 12months of history and spending more than 5000ドル. |
| 12 | + -REGULAR : Customers with at least 12 months of history but spending 5000$ or less |
| 13 | + -NEW : Customers with a lifespan less than 12 months. |
| 14 | +and find the total numbers od customers by each group |
| 15 | + |
| 16 | +SQLQuery-5. CUSTOMER REPORT |
| 17 | + |
| 18 | +Purpose: This report consolidates key customer metrics and behaviours. |
| 19 | + |
| 20 | +#Highlights: |
| 21 | + |
| 22 | + 1. Gathers essential fields such as names,ages,and transaction details. |
| 23 | + 2. Segments customers into categories (VIP,Regular,New) and age groups. |
| 24 | + 3.Aggregates customer-level metrics: |
| 25 | + -total orders |
| 26 | + -total sales |
| 27 | + -total quantity purchased |
| 28 | + -total products |
| 29 | + -lifespan (in months) |
| 30 | + 4.Calculates valueable KPIs: |
| 31 | + - recency(months since last order) |
| 32 | + -average order value |
| 33 | + -average monthly spend |
| 34 | +SQLQuery-6. PRODUCT REPORT |
| 35 | + |
| 36 | +Purpose: This report consolidates key product metrics and behaviours. |
| 37 | + |
| 38 | +#Highlights: |
| 39 | + |
| 40 | + 1. Gathers essential fields such as product name,category,subcategory and cost. |
| 41 | + 2. Segments products by revenue to identify High-Performers,Midd-Range,or Low-Range |
| 42 | + 3.Aggregates product-level metrics: |
| 43 | + -total orders |
| 44 | + -total sales |
| 45 | + -total quantity sold |
| 46 | + -total customers (unique) |
| 47 | + -lifespan (in months) |
| 48 | + 4.Calculates valueable KPIs: |
| 49 | + - recency(months sincelast sale) |
| 50 | + -average order revenue (AOR) |
| 51 | + -average monthly revenue |
| 52 | + |
0 commit comments