Im running an access database.
Which looks like this:
Im struggling to make a query to do exactly what i need.
Firstly i'll put it into context. Im allowing users to sign up to play in a sport, and i want to return a list of all the sports that are available to play in.
therefore...
I need to select all the sportName from TblSport.
However, i have a few other constraints i need to include:
A sport should only be selected if it has a league that has exactly ONE season stored in the TblLeagueSeason.
Also the size attribute in TblLeague specifies the maximum number of teams that can play in it.
A sport should only be Selected if the season has less than the max number of records (size) stored in TblLeagueSeasonTeam
So ive got as far as saying:
Select sportName FROM TblSport WHERE "number of seasons for a league in that sport = 1" AND "Number of teams for that season < size of its sport"
Any Help would be greatly appreiated!
Thanks! Ash