Uploaded by cqy31725

ITP 249 Homework 3

advertisement
ITP 249: Introduction to Data Analytics
Homework 03: 20 points
Due: 02/26/2021 @ 11:59PM
Goal
You’ll use MYSQL Workbench to write SQL queries to duplicate the results outlined below.
Procedure







Go to virtual lab
Launch MYSQL workbench
Connect to the ITP 249 server
Make your DB the default database/schema to answer this HW.
Create a single Word file with all the SQL queries. The first few lines should be:
-- Your Name
-- ITP 249
-- Homework 3
Write SQL queries to answer the questions. Insert a screenshot from MySQL workbench with
your SQL query and it’s result set.
Save the document as lastname_firstname_HW3.doc. Submit the file on Blackboard.
Create the Student Table in your Schema/Database: Zip file provided on BB. (4)
STUDENT
Write queries to answer the following questions based on the student table above.
1.
2.
3.
4.
5.
List the average GPA. (2)
List the students(names) who have GPA higher than the average GPA. (2)
List the average GPA for Male students. (2)
List the female students who have more than the average GPA. (2)
Count the female students who have more than the average GPA. (2)
6. List the maximum GPA by gender (2)
7. List minimum GPA by gender (2)
8. List the students (Name) who have a GPA greater than or equal to the minimum GPA (2)
9. List the students (Name) who have a GPA greater than or equal to the maximum GPA (2)
10. Count the number of students who have a GPA greater than or equal to the average GPA (2)
Page 2 of 2
Download