Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Class table contains information about students, classes and grades. In this example, we are not concerned with normalizations. The goal is the use the

The Class table contains information about students, classes and grades. In this example, we are not concerned with normalizations. The goal is the use the data provided and write SQL statements to view the desired output. The score attribute is a number data type, the DOB attribute is a date data type and all other attributes are string data types.

image text in transcribed

Part 1 Results of a Query

A series of queries are provided to you. Use the Class table above to determine the output that would result from each query.

1. SELECT count(*) from class;

2. SELECT Distinct Ucase(className) from class;

3. SELECT className, avg(score)

FROM class

WHERE grade=A

GROUP BY className;

Class classID MGMT329Aaron MGMT329 Jessica MGMT329 MichaeJohnsorn MGMT329 LebronWest MGMT329|Steven MGMT329 Amanda Stephenson04/19/1992Database MGMT329 JeremyJones MGMT450 Amanda Stephenson 04/19/1992 Computer Based IS MGMT450 SamanthaGivens MGMT450 Leslie MGMT450 Jeremy Jones MGMT450Brittany Davidson12/24/1990 Computer Based IS MGMT450 WilliamO'Connell01/07/1992 Computer Based IS MGMT450Aaron Name IName DOB className Score Grade 04/04/1950Database McMurphy05/29/1990Database 07/02/1989Database 07/21/1992Database McGiver 03/13/1989Database 98 85 92 74 79 French 90 83 86 94 75 91 97 83 07/15/1991Database 09/11/1988Computer Based IS McRoberts05/30/1989Computer Based IS 07/15/1991 Computer Based IS French 04/04/1950Computer Based IS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions