4. Create a SQL statement of the following; a. Show the gameid and gamedate of the game that were played in Araneta Coliseum or MOA Arena. b. Show the name, age, and birth date of the referee who were born in 1980's and 1990's. c. Show the name and address of the referee who lives in Visayas and Mindanao. d. Show winteamid, looseteamid, locationid and gamedate of the games that was played last November 2017. e. Show all the details of the referee whose age is from 30 to 40 years old.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

NEED HELP IN MY SQL 

WHAT IS THE COMMAND LINE (CMD) STATEMENT FOR THE QUERY IN NUMBER 4 (2ND PICTURE)

I REPEAT,

WHAT IS THE CMD QUERY FOR THE 4 (a,b,c,d,e) IN NUMBER 4

1. Create a database UAAP.
2. Create the following tables on the database that you created.
Field Name
TeamID
TeamName
Field Name
GameID
WinTeamID
LooseTeamID
WScore
LScore
Location ID
GameDate
TeamID
1
2
3
4
5
6
7
8
LocationID
1
2
3
Team
Team
Data Type
Int(3), unsigned, Auto_Increment,
Primary Key, not null
varchar(50), not null
3. Insert the following data on each table you created.
Game Play
Data Type
Int(3), unsigned, Auto_Increment, Primary Key
not null
TeamName
Ateneo Blue Eagles
La Salle Green Archers
UST Growling Tigers
FEU Tamaraws
UP Fighting Maroons
UE Red Warriors
Location
Adamson Falcons
NU Bulldogs
Int, not null
Int, not null
Int, not null
Int, not null
Int, not null
Date, not null
LocationName
Araneta Coliseum
Cuneta Astrodome
MOA Arena
RefereelD
1
2
3
4
5
6
GamelD
1
2
3
4
5
6
RefereeName
Gil Bautista
Rey Sanchez
Brando Ferrer
Ismael Mansol
Teofilo Ofre
Jaime Ranito
WinTeamID
1
5
3
2
5
3
Page 2/ 2
6
8
7
1
Field Name
RefereelD
Referee
Birthdate
1983-08-30
1980-11-08
1987-09-15
1977-10-31
1972-11-20
1992-11-02
Game Play
LooseTeamID WScore
4
98
102
76
85
116
89
96
85
2
RefereeName
Birthdate
Age
Address
Field Name
LocationID
LocationName
Data Type
Int (3), unsigned, Auto_Increment,
Primary Key, not null
Varchar(50), noy null
Date, not null
Referee
+
Data Type
Int(3), unsigned, Auto_Increment,
Primary Key not null
varchar(30), not null
Age
34
37
30
40
45
25
LScore
92
76
74
80
99
74
01
Location
76
Int(3), not null
Varchar(50), not null
Address
Luzon
Visayas
Luzon
Luzon
Mindanao
Visayas
Location ID
1
2
2
3
1
3
1
3
GameDate
2017-11-15
2017-11-20
2017-11-25
2017-12-15
2017-12-20
2018-01-05
2018-01-10
2018-01-15
Transcribed Image Text:1. Create a database UAAP. 2. Create the following tables on the database that you created. Field Name TeamID TeamName Field Name GameID WinTeamID LooseTeamID WScore LScore Location ID GameDate TeamID 1 2 3 4 5 6 7 8 LocationID 1 2 3 Team Team Data Type Int(3), unsigned, Auto_Increment, Primary Key, not null varchar(50), not null 3. Insert the following data on each table you created. Game Play Data Type Int(3), unsigned, Auto_Increment, Primary Key not null TeamName Ateneo Blue Eagles La Salle Green Archers UST Growling Tigers FEU Tamaraws UP Fighting Maroons UE Red Warriors Location Adamson Falcons NU Bulldogs Int, not null Int, not null Int, not null Int, not null Int, not null Date, not null LocationName Araneta Coliseum Cuneta Astrodome MOA Arena RefereelD 1 2 3 4 5 6 GamelD 1 2 3 4 5 6 RefereeName Gil Bautista Rey Sanchez Brando Ferrer Ismael Mansol Teofilo Ofre Jaime Ranito WinTeamID 1 5 3 2 5 3 Page 2/ 2 6 8 7 1 Field Name RefereelD Referee Birthdate 1983-08-30 1980-11-08 1987-09-15 1977-10-31 1972-11-20 1992-11-02 Game Play LooseTeamID WScore 4 98 102 76 85 116 89 96 85 2 RefereeName Birthdate Age Address Field Name LocationID LocationName Data Type Int (3), unsigned, Auto_Increment, Primary Key, not null Varchar(50), noy null Date, not null Referee + Data Type Int(3), unsigned, Auto_Increment, Primary Key not null varchar(30), not null Age 34 37 30 40 45 25 LScore 92 76 74 80 99 74 01 Location 76 Int(3), not null Varchar(50), not null Address Luzon Visayas Luzon Luzon Mindanao Visayas Location ID 1 2 2 3 1 3 1 3 GameDate 2017-11-15 2017-11-20 2017-11-25 2017-12-15 2017-12-20 2018-01-05 2018-01-10 2018-01-15
4. Create a SQL statement of the following,
a. Show the gameid and gamedate of the game that were played in Araneta Coliseum or MOA Arena.
b. Show the name, age, and birth date of the referee who were born in 1980's and 1990's.
c. Show the name and address of the referee who lives in Visayas and Mindanao.
d. Show winteamid, looseteamid, locationid and gamedate of the games that was played last
November 2017.
e. Show all the details of the referee whose age is from 30 to 40 years old.
Transcribed Image Text:4. Create a SQL statement of the following, a. Show the gameid and gamedate of the game that were played in Araneta Coliseum or MOA Arena. b. Show the name, age, and birth date of the referee who were born in 1980's and 1990's. c. Show the name and address of the referee who lives in Visayas and Mindanao. d. Show winteamid, looseteamid, locationid and gamedate of the games that was played last November 2017. e. Show all the details of the referee whose age is from 30 to 40 years old.
Expert Solution
steps

Step by step

Solved in 7 steps

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education