Print all teamids where the team played against th database

Assignment Help Database Management System
Reference no: EM132080059

You need help with this SQL question You have seen answers that work for only two leagues, but as the question states, the solution has to work for an unknown amount of leagues 4) List all cities that have a team in all leagues.

For example, there are currently two leagues (National and American).

Although not shown in this instance, New York is home to the Mets in the National league as well as the Yankees in the American league (Chicago also has one in each league, for those of you who are baseball fans).

Remember that your query must work over all instances of this schema, even if there are more than two leagues in the instance.

Databases: Print all teamIDs where the team played against th Databases Code:

CREATE TABLE `teams` ( `teamID` tinyint(4) default NULL, `teamName` varchar(50) default NULL, `home` varchar(50) default NULL, `leagueName` varchar(50) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('1','Phillies','Philadelphia','National'); INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('2','Braves','Atlanta','National'); INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('3','Yankees','New York','American'); INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('4','Twins','Minnesota','American'); INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('5','Rangers','Texas','American'); INSERT INTO `teams`(`teamID`,`teamName`,`home`,`leagueName`) VALUES ('6','Cubs','Chicago','National');

Reference no: EM132080059

Questions Cloud

Perform the test for the non-additive join property : Perform the test for the non-additive join property (lossless join) for the relation R(A1, A2, A3, A4, A5), and the decompositions Da, Db, Dc, Dd .
Emobile technology into healthcare organization : Other considerations of implementing eMobile technology into a healthcare organization?
What is the concept utilitarianism according to jeremy : What is the concept utilitarianism according to Jeremy Bentham? Is this a morally valid approach to governance? Why or why not?
What is the total cost that should be assigned to the job : Copy Center pays an average wage of s12 per hour to employees for printing and copying jobs, and allocates s18 of overhead for each employee hour are assoned.
Print all teamids where the team played against th database : Although not shown in this instance, New York is home to the Mets in the National league as well as the Yankees in the American league .
Evaluate the options for solving the problem : 1. What is the problem in the scenario. 2. Analyze the problem in the scenario. 3. Generate options for solving the problem in the scenario.
Administrator at health care facility : Suppose that you are the administrator at a health care facility. What recommendation would you make to your HR department, and why?
Compute the cost of goods destroyed : Tim Legler requires an estimate of the cost of goods lost by fire on March 9. Merchandise on hand on January 1 was $38,700. Purchases since January 1.
What basis will redbird have in bluejay assets : At the time of its liquidation, Bluejay Corporation had the following assets and liabilities: Basis to Fair Bluejay Corporation Market Value Cash $240,000.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd