223k views
4 votes
Use the BowlingLeagueExample database for the following questions. Provide the answer to the question AND the code you used to get the answer.

1. List the full name (in 1 column) of each bowler in alphabetical order. Include the middle initial if applicable.
2. When was the first bowling tournament? Use an aggregate function to find this answer. Only provide the date.
3. What year had more tournaments, 2017 or 2018 ? Use the tournaments table, not the tournaments_archive table. Your query should display only the year and the number of tournaments in that year, no other fields.

User Gimbl
by
6.3k points

1 Answer

2 votes

Final answer:

Without access to the specific BowlingLeagueExample database, SQL code and answers cannot be provided. Typically, such queries involve concatenation and sorting for full names, the MIN() function for the earliest date, and a count with GROUP BY for comparing yearly tournament counts.

Step-by-step explanation:

The BowlingLeagueExample database seems to be a hypothetical database not included in the provided information. Since there is no real database to reference, I cannot provide SQL code or specific answers. However, based on typical SQL queries:

  • To list the full name of each bowler, one would concatenate the first name, middle initial, and last name columns, and then use ORDER BY to sort them alphabetically.
  • To find the date of the first bowling tournament, one would use the MIN() aggregate function on the date column of the tournaments table.
  • To compare the number of tournaments between two years, a COUNT() with a GROUP BY clause would be used, filtering on the specific years in question.

To answer these questions, we need more information regarding the tables mentioned in the question. The question mentions two tables, but does not provide any details or context about them. Without knowing the structure, content, and purpose of the tables, it is not possible to determine which table is more correct or how the data could be grouped differently. Additionally, we cannot determine why there is a need to switch between tables or how they are related to each other.

User Robot Boy
by
7.0k points