MySQL Project Part 2 - Ad Hoc Reporting
TBDA.2 Project 2 Adhoc Report Answer
Questions to Answer
2_toastmaster.sql file
The LetsMeet CEO Evelyn wants to know how many Toastmasters events are occurring in each city.
-- Part A.
SELECT * FROM event AS e;
/* The query about fetches all events from the event table that includes the even_name Toastmasters or Toastmasters. */
QUERY 1
-- Find all events that include the word Toastmaster or toastmaster in LetsMeet.
QUERY 2
-- 2. The Total number of Toastmasters events on the LetsMeet
QUERY 3
-- 3. Write a query to give the exact counts for how particular cities host Toastmasters events.
Query 4
-- 4. How many Toastmasters events are there using LetsMeet in New York, Chicago and San Francisco?
3_growth.sql file
SELECt * FROM grp_member;
-- 1. Query for the Number of members who joined each year.
-- 2. Query for the Number of members who joined each year.
-- 3. Find the total number of members joined in cities like New York, Chicago, and San Francisco.
Query 3 Solved
--4. Use appropriate DML to rename the small cities to the name of their larger urban areas
SET SQL_SAFE_UPDATES = 0;
UPDATE grp_member
SET city = "Chicago"
WHERE city IN("East Chicago", "West Chicago", "North Chicago", "Chicago Heights", "Chicago Ridge", "Chicago");
SET SQL_SAFE_UPDATES = 1;
SELECT * FROM grp_member;
SET SQL_SAFE_UPDATES = 0;
UPDATE grp_member
SET city = "San Francisco"
WHERE city IN("San Francisco", "South San Francisco");
SET SQL_SAFE_UPDATES = 1;
SELECT * FROM grp_member;
SET SQL_SAFE_UPDATES = 0;
UPDATE grp_member
SET city = "New York"
WHERE city IN("New York", "West New York");
SET SQL_SAFE_UPDATES = 1;
/* The SQL queries above aimed at renaming small cities to th name of their larger urban are. */
-- 5. Write three queries that shows that the annual growth of Letsmeet for the larger geographical areas of chicago, San Francisco and New York.
-- - 6. Write a Query that shows that the annual growth of Letsmeet for the larger geographical Chicago.
-- 7. Write to find out number of members joined LetsMeet on Month by month in 2017
Feature_group.sql File
SELECT * FROM grp;
-- Query 1
-- Total number of groups from the grp table of LetsMeet.
SELECT COUNT(*) AS grp_total FROM grp;
/* This SQL query above counts the total number of groups from the grp table as grp_total which is 4340. */
-Query 2
-- 1 A. The Number of groups with 5-stars ratings
B. Of the groups that have been rated, what percentage of groups are rated 5 stars?
-- 2. Write a query to find those groups with the most members.
3. Is this a reliable measure of the success or popularity of the group? Yes
Summary Report
-- Summary of Findings
/* Summary from 2_toastmaster
--
Summary rport from 3_growth file
--
Summary report from 4_feature_groups.sql file
--
*/
-- Use this file to summarize your findings and make your recommendations where they have been requested.
/*
*/
-- Any recommendations should include the data to support why you are making that recommendation
/*
*/
-- 1. How many Toastmasters events are there using LetsMeet in New York, Chicago and San Francisco?
/*
-- 2. Is LetsMeet membership leveling off?
/*
*/
-- 3. What five groups should marketing feature in their upcoming campaign?*
/*
*/