Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Query Requirements Students are required to complete all the questions. Cla ssi fica tio n: Ge ner al 1 . Return all active teamfranchises, sorted

Query Requirements
Students are required to complete all the questions.
Cla
ssi
fica
tio
n:
Ge
ner
al
1. Return all active teamfranchises, sorted in alphabetical order by name
2. Return all hall of fame ids, sorted by increasing number of ballots
3. Find a list of all player ids who have been all stars but do not have a starting position. Do
not include duplicates.
4. Find a list of all pitching player ids which do not have a BAOpp value.Do not include
duplicates
5. Return the top 10 salaries before 1990, along with their team and player ids
6. Return the top 5 percent of innOuts from Fielding before 1960, along with their team and
player Ids
7. Return a single column with the first and last name and the city of all players who live in
a city that contains the string "San"
8. Return a single column with first and last name of all players and the nickname of all
players who have a nickname that contains "Old"
9. Return all school ids and names that are not in one of the following states: NY, LA, CA,
MN
10. Return the player ids and states of all players who are from one of the following cities:
Tampa, Minneapolis, Rochester, Chicago
11. Return the player ids and award names for each award that was a tie between 1990 and
2000
12. Return the player and year id of all pitching rows with an IPOuts value between 100 and
200, and which have a non-null BAOPP value
13. Return the playerIds of all players who died on the same month and day in which they
were born.
14. Return the team ID and year ID for all teams which had a world series win (WSWin)
while having an attendance of less than 500000
15. For all hall of fame winners, return the following columns:
a. playerID
b. yearID
c. closeOrNot
i. Someone has won the award if votes meets or exceeds the value of needed
ii. closeOrNot should be 'Nail Biter' if the difference between the votes and
the votes needed is less than 5 percent of the total number of ballots cast.
Otherwise, closeOrNot should be 'Landslide' (You may use integer
division for this query if you choose)
16. For all players, return the following columns:
a. player id
b. last name
Cla
ssi
fica
tio
n:
Ge
ner
al
c. first name
d. sameBirthDeath
i. sameBirthDeath should be 1 if the player died in the same country, city,
and state in which they were born, 0 if any of those fields do not match,
and NULL if any of the fields are NULL

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

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

A 300N F 30% d 2 m Answered: 1 week ago

Answered: 1 week ago