This project simulates a gym management system, using SQL to explore and extract strategic business insights from a relational database.
A total of 23 analytical SQL scripts were developed, covering areas such as financial health, customer profiles, product sales, instructor allocation, and more.
All data are fictitious and intended purely for portfolio and learning purposes.
🧠 Key Skills Demonstrated
- SQL (CTEs, joins, aggregations, window functions)
- Data modeling & KPIs
- Analytical reasoning and business storytelling
- Realistic simulation of a gym operational database
The project uses the following main tables (available in .sql or .csv format):
alunos
(students): personal data, age, neighborhood, registration and statusplanos
(membership plans): plan details and pricespagamentos
(payments): student payments, status, and payment methodmodalidades
(activities): list of activities offered (muscle training, cardio, pilates, etc.)frequencia
(attendance): daily logs of student presence by activityprodutos
(products): supplements, apparel, accessoriesvendas_produtos
(product sales): transactions with quantities and valuesprofessores
(instructors): personal data, profile and salaryprofessor_modalidade
(which instructor teaches which activity)despesas
&pagamentos_despesas
: operational costs (rent, maintenance, energy)
- Annual evolution of total costs (payroll + expenses)
- Annual evolution of total revenues (memberships + product sales)
- Annual evolution of new enrollments
- Accumulated revenue by year
- Accumulated costs by year
- Product sales evolution over time
- Most frequent gender in attendance
- Frequency comparison by age group
- Most represented neighborhoods
- Average ticket by student
- Average ticket by neighborhood
- Most crowded periods (morning, afternoon, evening)
- Most crowded days of the week
- Most practiced activities
- Average ticket by activity
- Most sold products
- Costs vs. revenues comparison
- Highest-paid instructors (overall)
- Highest-paid instructors by activity
- Membership distribution by plan
- Revenue share by plan
- Most common payment methods
- Instructors teaching more than one activity
- SQL (MySQL)
- MySQL Workbench (or any RDBMS client)
🗃️ Files
/1 - Business Evolution – 6 SQL scripts (.sql format)
/2 - Customer Profile – 5 SQL scripts (.sql format)
/3 - Gym Usage Patterns – 5 SQL scripts (.sql format)
/4 - Financials & Strategy – 7 SQL scripts (.sql format)
/5 - Database – Tables in SQL or CSV format
README.md – Project documentation
🚀 How to Use
- Clone this repository
- Import the database into your favorite RDBMS (like MySQL)
- Run the SQL scripts to explore the insights
- Feel free to adapt queries or use them in your portfolio
📌 Important Notes
This dataset was entirely generated with Python and does not reflect real people or businesses.
Several queries use advanced SQL features like:
- CTEs (
WITH
) - window functions (
ROW_NUMBER()
) - date functions (
DATE_FORMAT
,DATEDIFF
)
- Email: gioferracini97@gmail.com
- LinkedIn: linkedin.com/in/giovanni-ferracini
⭐ If you found this analysis useful or insightful, feel free to star the repository!