How to write a query in SQL to determine the outliers of the data set in the correct change column. There are 6 columns ID, gender, treatment, start_weight_kg, end_weight_kg, correct change. I need to find the numbers that are greater than -30 in the correct change column.
Table name is JerkyDietPlan
Our ultimate goal is to find the numbers that are greater than -30 in the correct change column. Here in this query, you have to make use of COUNT() and WHERE clause to get the required result.
So, by making use of them the following query is created.
SELECT COUNT(ID) FROM JerkyDietPlan WHERE "correct change">-30;
This will count the ID's(the number of people) in JerkyDietPlan whose "correct change" is greater than -30
#Please don't forget to upvote if you find the solution helpful.
Feel free to ask doubts if any, in the comments section. Thank
you.
Get Answers For Free
Most questions answered within 1 hours.