Question: Question 8 ( 6 points ) Consider the following database for a summer camp: Camper ( cid , name ) Team ( gid , age
Question points
Consider the following database for a summer camp:
Campercid name
Teamgidage
Assignmentcid gid
Relation Camper contains a tuple for each camper with name name and unique id cid.
Each tuple in relation Team holds the unique id of a team and the age of the campers assigned to that team. Finally, table Assignment captures the assignments of campers to teams. Primary keys are underlined. Attribute "name" is a varchar. All other attributes are integer type.
NOTE: The SQL questions are graded on the logic and structure of the query. Simple syntax error will not be penalized.
Q: points The query below was written to returns the name of all campers who have been assigned to a team.
Is this query correct? Else rewrite the query.
SELECT
Cname
FROM Camper C LEFT OUTER JOIN Assignment A
ON Ccid Acid
WHERE Agid IS NULL
Q: points Write a SQL query for the statement below:
Add the following data in Team table
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
