Skip to content
Advertisement

how do i rewrite the correct statement for COUNT under this condition

Bring back the count of all the batsmen who have played a certain number of innings only if there are more than one batsman who have played that number of innings. 4 innings – 2 batsmen, 5 innings – 3 batsmen etc.

Player is the field name for the batsmens name. I am kinda stuck on how to write the last lines statement

4 innings – 2 batsmen, 5 innings – 3 batsmen etc

This is the table design

Advertisement

Answer

I think this could be the solution to your problem:

Query1

OR

Query2

Sample Output :

Innings Totalplayer
4 2
6 3
7 2
9 3
10 2
13 3
14 2
23 2

View on DB Fiddle

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement