Challenge: Trend and Percentile Analysis
Swipe to start coding
You are a business intelligence analyst evaluating employee performance over time. Your goal is to analyze how employees' sales achievements change from one review to the next and how they rank compared to their peers on each review date.
Write a SQL query that:
- Lists each employee from the Sales department and their sales achieved for each review date.
- Shows the sales achieved on the previous review for the same employee (if any) using a window function.
- Calculates the percentile rank of each employee's sales achieved among all employees for that review date using a window function.
- Includes the following columns in your result:
employee_id,review_date(as date),sales_achieved,previous_sales_achieved, andpercentile.
Lösning
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Fantastiskt!
Completion betyg förbättrat till 5.56
Challenge: Trend and Percentile Analysis
Svep för att visa menyn
Swipe to start coding
You are a business intelligence analyst evaluating employee performance over time. Your goal is to analyze how employees' sales achievements change from one review to the next and how they rank compared to their peers on each review date.
Write a SQL query that:
- Lists each employee from the Sales department and their sales achieved for each review date.
- Shows the sales achieved on the previous review for the same employee (if any) using a window function.
- Calculates the percentile rank of each employee's sales achieved among all employees for that review date using a window function.
- Includes the following columns in your result:
employee_id,review_date(as date),sales_achieved,previous_sales_achieved, andpercentile.
Lösning
Tack för dina kommentarer!
single