Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 ( 1 point ) Here are three relations, R ( A , B ) , S ( C , D ) , and
Question point
Here are three relations, RAB SCD and TEF Their current values are:
R S T
A B
C D
E F
Compute the result of the query:
SELECT A F SUMC SUMD
FROM R S T
WHERE B C AND D E
GROUP BY A F
HAVING COUNT
Identify, in the list below, the row that appears in the result.
Question options:
Question point
The table
ScoresTeam Day, Opponent, Runs
Gives the scores in the Japanese Baseball League for two consecutive days. The Opponent is NULL if the Team did not play on that day. The number of Runs is given as NULL if either the team did not play, or will play on that day but the game is not yet concluded. The data in this table is as follows:
Team Day Opponent Runs
Dragons Sunday Swallows
Tigers Sunday Bay Stars
Carp Sunday NULL NULL
Swallows Sunday Dragons
Bay Stars Sunday Tigers
Giants Sunday NULL NULL
Dragons Monday Carp NULL
Tigers Monday NULL NULL
Carp Monday Dragons NULL
Swallows Monday Giants
Bay Stars Monday NULL NULL
Giants Monday Swallows
Consider the following three queries, which differ only in the team mentioned in the WHERE clause.
SELECT COUNT COUNTRuns
FROM Scores
WHERE Team 'Tigers'
SELECT COUNT COUNTRuns
FROM Scores
WHERE Team 'Carp'
SELECT COUNT COUNTRuns
FROM Scores
WHERE Team 'Swallows'
Then, identify in the list below the result of one of these queries.
Question options:
NULL
Question point
The latest scores from the Japanese Baseball League are in the table with schema
ScoresTeam Opponent, RunsFor, RunsAgainst
The data in this table is as follows:
Team Opponent RunsFor RunsAgainst
Dragons Tigers
Carp Swallows
Bay Stars Giants
Marines Hawks
Ham Fighters Buffaloes
Lions Golden Eagles
Tigers Dragons
Swallows Carp
Giants Bay Stars
Hawks Marines
Buffaloes Ham Fighters
Golden Eagles Lions
What is the result of executing on this data the query:
SELECT Team, Opponent
FROM Scores
WHERE Team LIKE OR
Opponent LIKE i
Identify, in the list below, a row of the result.
Question options:
Hawks Marines
Golden Eagles Lions
Buffaloes Ham Fighters
Giants Bay Stars
Question point
The table Arcxy currently has the following tuples note there are duplicates: Compute the result of the query:
SELECT ax ay COUNT
FROM Arc a Arc a
WHERE ay ax
GROUP BY ax ay;
Which of the following tuples is in the result?
Question options:
Question point
Here are three relations, Rab Sab and Tab Their current values are:
R S T
a b
a b
a b
Compute the result of the query:
SELECT Ra Rb Sb Tb
FROM R S T
WHERE Rb Sa AND Sb Tb
Identify, in the list below, the true statement about whether or not a tuple appears in the output, and how many times it appears.
Question options:
appears twice.
appears once.
appears once.
appears once.
Question point
Suppose we have a relation with schema
RA B C D E
If we issue a query of the form
SELECT
FROM R
WHERE
GROUP BY C D
What terms can appear in the SELECT list represented by in the above query Identify, in the list below, the term that CAN NOT appear.
Question options:
MAXB
SUME
A
COUNT
Question point
The latest scores from the Japanese Baseball League are in the table with schema
ScoresTeam Opponent, RunsFor, RunsAgainst
The data in this table is as follows:
Team Opponent RunsFor RunsAgainst
Dragons Tigers
Carp Swallows
Bay Stars Giants
Marines Hawks
Ham Fighters Buffaloes
Lions Golden Eagles
Tigers Dragons
Swallows Carp
Giants Bay Stars
Hawks Marines
Buffaloes Ham Fighters
Golden Eagles Lions
What is the result of executing on this data the query:
SELECT Team AS Winner, RunsFor RunsAgainst AS Runs
FROM Scores
WHERE RunsFor RunsAgainst
Identify in the list below, a value and the name of a column in which it appears.
Question options:
"Dragons" appears in column Winner.
appears in column RunsFor.
appears in column Runs.
appears in column RunsAgainst.
Question point
The latest scores from the Japanese Baseball League are in the t
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started