Hey Folks,
#day17 of #100daysofcodechallenge
𝑷𝒓𝒐𝒃𝒍𝒆𝒎 𝑺𝒕𝒂𝒕𝒆𝒎𝒆𝒏𝒕:
➡ In the United States, fast food is the cornerstone of it's very society. Without it, it would cease to exist.
➡ But which region spends the most money on fast food?
➡ Write a query to determine which region spends the most amount of money on fast food.
𝑺𝑸𝑳 𝒔𝒄𝒉𝒆𝒎𝒂:
CREATE TABLE fast_food_data (
state VARCHAR(50),
region VARCHAR(50),
fast_food_millions INT
);
INSERT INTO fast_food_data (state, region, fast_food_millions) VALUES
('Alabama', 'South', 83),
('Alaska', 'West', 80),
('Arizona', 'West', 81),
('Arkansas', 'South', 45),
('California', 'West', 52),
('Colorado', 'West', 84),
('Connecticut', 'Northeast', 13),
('Delaware', 'South', 39),
('Florida', 'South', 78),
('Georgia', 'South', 29),
('Hawaii', 'West', 81),
('Idaho', 'West', 99),
('Illinois', 'Midwest', 67),
('Indiana', 'Midwest', 82),
('Iowa', 'Midwest', 27),
('Kansas', 'Midwest', 50),
('Kentucky', 'South', 99),
('Louisiana', 'South', 11),
('Maine', 'Northeast', 85),
('Maryland', 'South', 47),
('Massachusetts', 'Northeast', 71),
('Michigan', 'Midwest', 60),
('Minnesota', 'Midwest', 28),
('Mississippi', 'South', 87),
('Missouri', 'Midwest', 69),
('Montana', 'West', 73),
('Nebraska', 'Midwest', 100),
('Nevada', 'West', 36),
('New Hampshire', 'Northeast', 92),
('New Jersey', 'Northeast', 33),
('New Mexico', 'West', 92),
('New York', 'Northeast', 17),
('North Carolina', 'South', 98),
('North Dakota', 'Midwest', 16),
('Ohio', 'Midwest', 15),
('Oklahoma', 'South', 43),
('Oregon', 'West', 93),
('Pennsylvania', 'Northeast', 100),
('Rhode Island', 'Northeast', 47),
('South Carolina', 'South', 62),
('South Dakota', 'Midwest', 33),
('Tennessee', 'South', 100),
('Texas', 'South', 94),
('Utah', 'West', 41),
('Vermont', 'Northeast', 48),
('Virginia', 'South', 79),
('Washington', 'West', 80),
('West Virginia', 'South', 49),
('Wisconsin', 'Midwest', 35),
('Wyoming', 'West', 15);
⬇ Pandas df in comments
🏹 Feel free to share you approach
#dataanalyst #dataanalytics #interviewpreparation #SQL #pandas
Chief Economic Opportunity Officer at LinkedIn
1moGreat initiative Tony Xu. Kofi Amoo-Gottfried and I were talking about the incredible impact work you all are doing a few weeks ago. Doing good while doing well. You love to see it.