Question: Analytics and Reporting ( my part ) Aits about analyzing member demographics, attendance trends, and satisfaction surveys. Optimizing class schedules, staffing levels, and marketing strategies

Analytics and Reporting (my part)
Aits about analyzing member demographics, attendance trends, and satisfaction surveys.
Optimizing class schedules, staffing levels, and marketing strategies based on data insights. it is required to Use MySQL to create the required statements (create tables with attributes, insert for the tuples, retrieve) for Gym and fitness centre management system. I will send my answer check it, if its not correct fix it please.
CREATE TABLE MemberDemographics (
member_id INT PRIMARY KEY,
age INT,
gender ENUM('Male', 'Female', 'Other'),
location VARCHAR(100),
occupation VARCHAR(100),
income DECIMAL(10,2),
join_date DATE,
FOREIGN KEY (member_id) REFERENCES Members(member_id)
);
CREATE TABLE AttendanceTrends (
date DATE PRIMARY KEY,
total_attendance INT,
UNIQUE KEY (date)
);
CREATE TABLE SatisfactionSurveys (
survey_id INT AUTO_INCREMENT PRIMARY KEY,
member_id INT,
satisfaction_rating INT,
comments TEXT,
survey_date DATE,
FOREIGN KEY (member_id) REFERENCES Members(member_id)
);
CREATE TABLE ClassSchedules (
class_id INT AUTO_INCREMENT PRIMARY KEY,
class_name VARCHAR(100),
instructor_name VARCHAR(100),
class_schedule DATETIME,
max_capacity INT,
UNIQUE KEY (class_schedule)
);
CREATE TABLE StaffingLevels (
date DATE PRIMARY KEY,
total_staff INT,
UNIQUE KEY (date)
);
CREATE TABLE MarketingStrategies (
strategy_id INT AUTO_INCREMENT PRIMARY KEY,
strategy_name VARCHAR(100),
description TEXT,
start_date DATE,
end_date DATE
);
INSERT INTO MemberDemographics (member_id, age, gender, location, occupation, income, join_date) VALUES (1,30, 'Male', 'New York', 'Software Engineer', 80000.00,'2023-01-10'),(2,35, 'Female', 'Los Angeles', 'Marketing Manager', 75000.00,'2022-12-05'),(3,25, 'Male', 'Chicago', 'Student', 20000.00,'2024-02-20');
INSERT INTO AttendanceTrends (date, total_attendance)
VALUES
('2024-04-01',150),
('2024-04-02',160),
('2024-04-03',170);
INSERT INTO SatisfactionSurveys (member_id, satisfaction_rating, comments, survey_date)
VALUES
(1,4, 'Great facilities and friendly staff.','2024-04-12'),
(2,5, 'Love the variety of classes offered.','2024-04-12'),
(3,3, 'Could improve cleanliness in the locker rooms.','2024-04-12');
INSERT INTO ClassSchedules (class_name, instructor_name, class_schedule, max_capacity)
VALUES
('Yoga', 'Sarah Jones', '2024-04-1210:00:00',20),
('Spin', 'Michael Smith', '2024-04-1212:00:00',15),
('Zumba', 'Emily Brown', '2024-04-1216:00:00',25);
INSERT INTO StaffingLevels (date, total_staff)
VALUES
('2024-04-01',10),
('2024-04-02',12),
('2024-04-03',11);
INSERT INTO MarketingStrategies (strategy_name, description, start_date, end_date)
VALUES
('Social Media Campaign', 'Launch a targeted ad campaign on Facebook and Instagram.','2024-04-01','2024-05-01'),
('Referral Program', 'Offer discounts to members who refer new customers.','2024-04-01','2024-06-01');
SELECT * FROM MemberDemographics WHERE member_id =1;
SELECT * FROM AttendanceTrends WHERE date BETWEEN '2024-04-01' AND '2024-04-03';
SELECT * FROM SatisfactionSurveys WHERE survey_date ='2024-04-12';
SELECT * FROM ClassSchedules WHERE class_name = 'Yoga';
SELECT * FROM StaffingLevels WHERE date ='2024-04-01';
SELECT * FROM MarketingStrategies WHERE start_date = CURDATE() AND end_date >= CURDATE();
Analytics and Reporting ( my part ) Aits about

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!