0% found this document useful (0 votes)
14 views2 pages

Completed SQL Homework Assignment

This document outlines the exercises for Module 6 of the BMI 5300 course, focusing on SQL aggregate functions using DB Browser for SQLite. It includes specific questions about patient data, such as average height and weight, as well as SQL queries to retrieve this information. Students are instructed to complete the exercises and record their answers before submitting them in Canvas within a 10-minute time frame.

Uploaded by

Garree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Completed SQL Homework Assignment

This document outlines the exercises for Module 6 of the BMI 5300 course, focusing on SQL aggregate functions using DB Browser for SQLite. It includes specific questions about patient data, such as average height and weight, as well as SQL queries to retrieve this information. Students are instructed to complete the exercises and record their answers before submitting them in Canvas within a 10-minute time frame.

Uploaded by

Garree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

BMI 5300 Introduction to Biomedical Informatics

Module 6: SQL Aggregate Functions, Counting, and Sorting


** Using DB Browser for SQLite **
Spring 2025

Preparation
1. Complete any SQL homework tutorials for this week BEFORE attempting this assignment.
2. Do the exercises and record your answers on this worksheet BEFORE opening the quiz in
Canvas.
3. You will then use this worksheet to enter your answers in Canvas. You will have 10 minutes
to enter your answers in Canvas.

Do the following exercises and write down your answers on this sheet
1. What is the average height of all patients?
[Enter only the numbers to the left of the decimal and 1 digit to the right of the decimal. For
example: for 123.456 you would enter 123.45. DO NOT round up or down.]
67.07

2. Paste your query below:


SELECT AVG(Height)
FROM Patients;

3. What is the average weight of all the female patients?


[Enter only the numbers to the left of the decimal and 1 digit to the right of the decimal. For
example: for 123.456 you would enter 123.45. DO NOT round up or down.]
198.74

4. What is the heaviest weight of all the male patients?


735

______________________________________________________________________________
5. What is the heaviest weight of all patients? Paste your query below:
740
SELECT Weight
FROM Patients
ORDER BY Weight DESC;

6. What is the tallest height for all patients in the state of New York (abbreviation NY)?
81

ECJ 2/6/25 Page 1 of 2


BMI 5300 Introduction to Biomedical Informatics Module 6: SQL Aggregate Functions, Counting, and Sorting

7. What is the LAST name of the patient with the lowest weight in the state of Tennessee
(abbreviation TN)? Garcia
8. How many patients have a B+ blood type?
(Note 1: your query should only give you a number.)
(Note 2: Check the spelling and capitalization of the column name for blood type.)
186

9. Write a query that gives you just the total number of patients who have a particular blood
type. Paste your query below:
SELECT COUNT(BloodType)
FROM Patients
WHERE BloodType LIKE 'BloodType';

10. Run a query that shows you all the patients, with the oldest patient first.
According to the dates of birth in the database, what is the FIRST name of the oldest
patient?
Michael

11. Paste the query that shows you all the patients with the oldest patient first, and have
your results sorted.
SELECT *
FROM Patients
ORDER BY DOB ASC;

Rev. 2/6/2025 ECJ Page 2 of 2

You might also like