English

Using the sports database containing two relations (TEAM, MATCH_DETAILS) and write the Query for the following: Display the MatchID and date of matches played by Team 1 and 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 and date of matches played by Team 1 and won by it.

Short Note

Solution

SELECT MatchID, MatchDate FROM MATCH_DETAILS WHERE (FirstTeamId = 1 AND FirstTeamScore > SecondTeamScore) OR (SecondTeamID = 1 AND SecondTeamScore > FirstTeamScore);

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

Englishहिंदीमराठी


      Forgot password?
Use app×