Question

How to write a query in SQL to determine the outliers of the data set in...

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

Homework Answers

Answer #1

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.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write code in SQL. Q1) By looking at city table. Write a query that identify the...
Write code in SQL. Q1) By looking at city table. Write a query that identify the in how many cities the company has branches. Rename the column name to TotalNumberOfCities. You have to look at city table and write a query to count number of rows. Q2) By looking at film table. How many films we have that its description contains the word "Robot". Count number of films and rename the column to NumberofRobots Q3) By looking at film table....
Using SQL, write a query that will display the vendor name and the amount due for...
Using SQL, write a query that will display the vendor name and the amount due for each vendor. The Vendor table has a list of vendor id and vendor name. The invoice table holds invoice num, vendor id, total amt, payment amt, and credit amount. To calculate amount due, you will take the total amt and subtract payment and credit amount to get this final total. Each vendor should only appear once in the display and amount due will be...
Perform SQL queries in the given data structure. write an SQL query that gives the number...
Perform SQL queries in the given data structure. write an SQL query that gives the number of courses taken for every student in the student table. For each instructor, show the instructor name and the number of sections that have been taught by that instructor. You do not need to include instructors who have never taught a section. List in order of decreasing the number of sections taught. Give the number of semester/year combinations in which sections have been offered....
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique order which has more than 3 productCode in each order. b. List the customer name and address who purchase more than 5 items (ProductCode) in the order.  
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How...
A Guide to SQL Questions 1. How do you create a table using SQL? 2. How do you delete a table using SQL? 3. What are the common data types used to define columns using SQL? 4. Identify the best data type to use to store the following data in Oracle, in SQL Server, and in Access:    a. The month, day, and year that an employee was hired    b. An employee’s Social Security number    c. The department...
Consider Sakila Database. Write a query in mySQL workbench to answer each of following questions. Q1)...
Consider Sakila Database. Write a query in mySQL workbench to answer each of following questions. Q1) By looking at city table. Write a query that identify the in how many cities the company has branches. Rename the column name to TotalNumberOfCities. You have to look at city table and write a query to count number of rows. Q2) By looking at film table. How many films we have that its description contains the word "Robot". Count number of films and...
Sometimes we need to determine if data is actually “normal”. Determine if the data set includes...
Sometimes we need to determine if data is actually “normal”. Determine if the data set includes more than 1 outlier. 85,53,70,10,11,40,10,65,55,25 1. What is my 5 number summary? 2. What is my interquartile range? 3. What is an outlier in my data set? 4. Do I have any outliers in the lower part of my data set?
In SQL working with data types 1. Write a SELECT statement that returns these columns from...
In SQL working with data types 1. Write a SELECT statement that returns these columns from the Instructors table: a. The monthly salary (the AnnualSalary column divided by 12) b. A column that uses the CAST function to return the monthly salary with 1 digit to the right of the decimal point c. A column that uses the CONVERT function to return the monthly salary as an integer d. A column that uses the CAST function to return the monthly...
3. How many people have the last name King Use PL/SQL? Code: Output: 4. Change the...
3. How many people have the last name King Use PL/SQL? Code: Output: 4. Change the first name to Stephen for the person with the last name King Use PL/SQL. Code: Output: Copy the record showing name change: Code: Output: 5. Delete all employees in Department 20. Use %TYPE for the variable. Use SQL%ROWCOUNT to see how many records were deleted. Code: Copy output showing ROWCOUNT: 6. Use a merge to merge the original employees table into emp_test. Do UPDATE...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT