Question

In: Computer Science

Need SQL commands for these questions based on the bowling league database; When was the first...

Need SQL commands for these questions based on the bowling league database; When was the first tournament date and where was it played? What are the number of tournaments per location?

Solutions

Expert Solution

Here Taking a sample data as shown below.

TOURNAMENTS is a table which has these list of attributes ID, NAME, DAY, LOCATION.

To find the fist tournament date and location, we need to sort with respect to the day and the top one will be the first tournament. So here we are using ORDER BY DAY as well as the LIMIT as 1

SELECT * FROM TOURNAMENTS T ORDER BY T.DAY LIMIT 1;

To find the number of tournaments per location, Need to group those records based on the location. So here using the GROUP BY
SELECT T.LOCATION, COUNT(*) AS NO_TOURNAMENT FROM TOURNAMENTS T GROUP BY T.LOCATION;


Related Solutions

Use the following information to create SQL commands to retrieve data from Henry Books database :...
Use the following information to create SQL commands to retrieve data from Henry Books database : For each book, list the book code, book title, publisher code, and publisher name. Order the results by publisher name. For each book published by Plume, list the book code, book title, and price. List the book title, book code, and price of each book published by Plume that has a book price of at least $14. List the book code, book title, and...
Using your downloaded DBMS (MS SQL Server), create a new database. Create the database tables based...
Using your downloaded DBMS (MS SQL Server), create a new database. Create the database tables based on your entities defining The attributes within each table The primary and foreign keys within each table *****Show your database tables, tables attributes, primary and foreign keys***** Do not forget to check the lesson slides and videos that show you how to convert an ER/EER into a database schema, and how to create a database and tables using MS SQL Server.
Need answers for Normalization, Physical Design, Sql, And Security exam. 1. The database you're creating will...
Need answers for Normalization, Physical Design, Sql, And Security exam. 1. The database you're creating will be installed on a group of three servers. What feature of an enterprise RDBMS will allow one server to pick up the processing work if the main server becomes nonoperational? A. Failover B. Business intelligence C. Data warehouse D. Load balancing 2. What type of clause must you always use with DELETE or UPDATE to avoid inadvertently changing data elsewhere in the database? A....
Create first draft for online shopping database (SQL): Things to do: Identify the entities Identify the...
Create first draft for online shopping database (SQL): Things to do: Identify the entities Identify the attributes Constraints Relations First Normal form Second Normal Form Third Normal Form Test Query to: Add a new item as a seller Query for total number of sold item in past month Query for total income in US DOLLARS
Create the following SQL queries using the lyrics database below 1. List the first name, last...
Create the following SQL queries using the lyrics database below 1. List the first name, last name, and region of members who do not have an email. 2. List the first name, last name, and region of members who do not have an email and they either have a homephone ending with a 2 or a 3. 3. List the number of track titles that begin with the letter 's' and the average length of these tracks in seconds 4....
Need the mongodb queuries translated into sql. All files are From stocks except the first is...
Need the mongodb queuries translated into sql. All files are From stocks except the first is from zips. Will give thumbs up! db.zips.aggregate([ {$match: {state: "IL"}}, {$group: {_id: "$city", totalzips: {$sum: 1}}}, {$match: {totalzips: {$gte: 3}}}, {$sort: {totalzips: -1}} ]) db.stocks.aggregate([ {$match: {"Sector": "Information Technology", "Dividend Yield": {$gt: 0}}}, {$project: {_id: 0, Name: 1}} ]) db.stocks.aggregate([ {$match: {Sector: "Health Care"}}, {$sort: {"Earnings/Share": -1}}, {$limit: 10}, {$project: {_id: 0, Name: 1, "Earnings/Share": 1}} ]) db.stocks.aggregate([ {$match: {Sector: "Health Care"}}, {$group: {_id:...
Based on "Fraud in Collegiate Athletics"Case When Major League Money Meets Little League Controls ( Adapted...
Based on "Fraud in Collegiate Athletics"Case When Major League Money Meets Little League Controls ( Adapted from an article in Fraud Magazine, January/February 2012) By Herbert W. Snyder 1. Identify some of the weaknesses in KU's internal controls that allowed fraud to occur in the athletic department. Explain your answer. 2. Do you think that the sentences given to the perpetrators were appropriate? or too harsh? or too lenient? Explain your answer. Fraud in Collegiate Athletics When Major League Money...
Often, when designing a program, public administrators must first consider the need for it by estimating...
Often, when designing a program, public administrators must first consider the need for it by estimating the size of the population in need of the services provided by the program. Imagine a program designed to provide meals-on-wheels to eligible elderly shut-ins.In your own words (500 words or less), explain the purpose/use of inferential statistics in such a needs assessment Include in your essay the concepts of sample, population, statistic, parameter, representativeness Make sure that you define each of these terms...
Answer these questions based on the CGP Grey Video, “Humans Need Not Apply” Grey describes automation...
Answer these questions based on the CGP Grey Video, “Humans Need Not Apply” Grey describes automation as a significant threat to the workforce. Is this view accurate? Refer to specific ideas from the video in your answer and explanation. How must society change, if at all, to accommodate technological advancements that will affect the labor force? What can you do personally to ensure your own employability in a technologically evolving civilization?
​​​​​​For my Accounting project I need to answer the following questions: 1. Based on your analysis...
​​​​​​For my Accounting project I need to answer the following questions: 1. Based on your analysis and company research would you, as a bank-lending officer, approve a 5-year loan for this company? If so, how much would you approve the loan for and for what purpose? Would you require security or collateral? Explain your reasoning. As a bank-lending officer, I would approve a 5 year short term loan for Johnson and Johnson. 2. Provide a recommendation as to whether an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT