Question 10
Consider the following relational schema and answer the given subquestions.
Questions:
- Find the first names of players whose names start with 'A' and have at least 4 characters.
- Find out the number of players in each team.
- List the team names that have players with the last name 'Smith'.
SQL queries:
a. SELECT FirstName FROM Player WHERE FirstName LIKE 'A___%';b. SELECT FirstName FROM Player WHERE FirstName LIKE 'A___';c. SELECT TeamID, COUNT(PlayerID) FROM Player GROUP BY PlayerID;d. SELECT TeamID, COUNT(PlayerID) FROM Player GROUP BY TeamID;e. SELECT distinct t.TeamName FROM Team t INNER JOIN Player p ON t.TeamID = p.TeamID WHERE p.LastName = 'Smith';f. SELECT distinct t.TeamName FROM Team t, Player p WHERE t.TeamID = p.TeamID AND p.LastName = 'Smith';Match the correct SQL queries with the corresponding Questions.
1-a, 2-d, 3-f
1-b, 2-c, 3-e
1-a, 2-d, 3-e
1-a, 2-e, 3-f