Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(19 points) We have the following two tables. The table Student contains the information of five students and the table Transcript contains their grades of

image text in transcribed
(19 points) We have the following two tables. The table Student contains the information of five students and the table Transcript contains their grades of three courses. Table 1 Student ID 1001 1002 1003 1004 1005 Name Mary Jason Linda Joe Kathy Gender F M F M F StudentID 1001 1002 1003 1004 1005 Math 65 77 67 80 74 Table 2 Transcript Physics 61 77 63 69 70 Chemistry 72 76 49 75 80 | (1) (5 points) Write an SQL query to create a table called Record. The table has 6 columns: Studenti, Name, Gender, Math, Physics and Chemistry. Assume that StudentID is an integer. Name is a string with a maximum length of 50 characters. Gender is a string with a maximum length of 1 character and the grades of three courses are floats. Please specify its primary key as the combination of StudentID and Name. (2) (10 points) Suppose we have a Student table and a Transcript table in the SQL database. The contents of the two tables are consistent with Table 1 and Table 2. respectively. Please write an SQL query to find the student name with the highest Chemistry score. (3) (4 points) Write the output of the following query: atery SELECT Name, Math, Physics, Chemistry FROM.Student, Transcript WHERE ID = StudentID AND Gender='F' AND Math > 70 AND Physics > 65

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions