In this task, it's required to Import the provided excel sheet into any relational database and answer certain questions using sql queries. This task is submitted to eT3 - Internship 2022
Install Any relational database, I used mysql workbench
https://dev.mysql.com/downloads/workbench/
Download the drinkMenu.csv dataset
https://drive.google.com/file/d/1osclWvpXTtIBV4t0fTBuPux74RkIkwmX/view
- Which drink has the highest calories from the dataset ?
SELECT Beverage,Calories as 'highest_calorie_drink'
FROM drink_menu.drink_menu_table
where Calories = (SELECT MAX(Calories) from drink_menu.drink_menu_table);
/* or */
SELECT Beverage,Calories as 'highest_calories_drink'
FROM drink_menu.drink_menu_table
ORDER BY Calories DESC
LIMIT 1
- What is the average calorie amount for each drink category
SELECT Beverage_category , AVG(Calories)
FROM drink_menu.drink_menu_table
GROUP BY Beverage_category
- Which drinks have below average calorie amount ?
SELECT Beverage as "Drinks below average value (201.04)",Calories
FROM drink_menu.drink_menu_table
where Calories < (select avg(calories) from drink_menu.drink_menu_table)