SQL database design and analytics project for Western Digital inventory and operations.
- Monthly revenue trends
- Invoice status breakdown
- Total revenue calculation
- Monthly expenses
- Employee expense tracking
- Total expense summary
- Revenue vs Expenses
- Profit calculation
Example query used to calculate total department expenses:
SELECT d.name AS department,
SUM(ex.amount) AS total_expenses
FROM expense ex
JOIN employee e ON ex.employee_id = e.employee_id
JOIN department d ON e.department_id = d.department_id
GROUP BY d.name;