SOLVE

LATER

Count the Matches

Problem

Editorial

Analytics

Fredo has recently joined the statistical section of a cricket broadcasting channel. He is given a table which consists of three fields as described below:

1. **MatchId**: Id of the cricket match.

2. **U1**: Name of the first on field umpire.

3. **U2**: Name of the second on field umpire.

His task is to count the number of matches in which one of the on field umpires is 'Bowden' or 'Taufel' and the other umpire is not 'Buckner'. Help him with the task.

**Note**: Cricket is a game in which there are two on field umpires in every match.

Table : **UmpireInfo**

Field | Type |
---|---|

MatchId | int |

U1 | text |

U2 | text |

Field | Type |
---|---|

Ans | int |

**Sample logs Table:**

MatchId | U1 | U2 |
---|---|---|

1 | Bowden | Buckner |

2 | Bowden | Taufel |

3 | Buckner | Taufel |

4 | Taufel | Bowden |

5 | Taufel | Bowden |

6 | Buckner | Bowden |

7 | Buckner | Taufel |

8 | Taufel | Buckner |

Ans |
---|

3 |

**Explanation**:

The matches 2,4 and 5 satisfy the given condition. Hence, answer is 3.

Time Limit:
5 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
MySQL,
PostgreSQL,
MSSQL,
Oracle_Db

Initializing Code Editor...

{"4fb3968": "/pagelets/show-submission/sql/count-the-matches/", "1ad26cc": "/pagelets/problem-author-tester/sql/count-the-matches/", "0525357": "/pagelets/problems-hint/sql/count-the-matches/", "de96e26": "/pagelets/suggested-problems/sql/count-the-matches/", "86b4e83": "/pagelets/recommended-problems/sql/count-the-matches/"}

realtime.hackerearth.com

80

fb24489bce75715959a3982c9a97dee1aa64114c

58a29e5cae2309f04b28

/realtime/pusher/auth/