English

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following: Display the MatchID of matches played by Team 2 and not won by it. -

Advertisements
Advertisements

Question

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following:

Display the MatchID of matches played by Team 2 and not won by it.

One Line Answer

Solution

SELECT MatchID FROM MATCH_DETAILS WHERE SecondTeamScore < FirstTeamScore AND (FirstTeamID = 2 OR SecondTeamID = 2);

shaalaa.com
SQL for Data Query
  Is there an error in this question or solution?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×