I have to come up with business questions and queries from a mock clothing store
ID: 3887384 • Letter: I
Question
I have to come up with business questions and queries from a mock clothing store. We don't have any actual table names or anything, we are just practicing what queries would look like.... Please let me know if these seem correct, or what I can do to adjust them and make them better. Thanks :)
D1.) Which departments were the most profitable last quarter?
E1.) Select Departments
From Summer2017
Where Profit >= 10,000;
D2.) Which customers have a birthday this month?
E2.) Select Customer
From CustomerList
Where Birthday Like ‘September%’;
D3.) Which customers haven’t been in in a while?
E3.) Select Customer
From CustomerList
Where MostRecentVistit Like ‘%2016’;
D4.) Which employee obtained the most customer loyalty sign ups last month?
E4.) Select SignUps, Employee
From RewardProgram
Where Month Like ‘August’;
D5.) Which products aren’t moving?
E5.) Selects Products
From Inventory
Where OnHand > 25;
D6.) What departments are struggling?
E6.) Select Departments
From Fall2017
Where Profit < 5,000;
D7.) Are we sold out of anything?
E7.) Select Product
From Inventory
Where>
D8.) Did any employees reach overtime last month?
E8.) Select Hours, Employee
From AugLabor
Where Hours =< 40;
D9.) How are our Plus Size sales?
E9.) Select Department
From Sales
Where Department Like ‘PlusSize’;
D10.) What brand of shoes sold the most last quarter?
E10.) Select Brand, Shoes
From Summer2017
Where Sold > 50;
Explanation / Answer
Which employee obtained the most customer loyalty sign ups last month
SELECT
COUNT(SignUps)AS Sign_Ups , Employee
FROM
RewardProgram
WHERE
Where Month Like ‘August'
GROUP BY
SignUps
ORDER BY
Sign_Ups DESC LIMIT 1;
D8.) Did any employees reach overtime last month?
E8.) Select Hours, Employee
From AugLabor
Where Hours >= 40 AND Month Like september'