Search Postgresql Archives

help with a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i have data bast that represents basketball teams. and i'm trying to find one team that has not won yet but has gain that most points during their games from the other team who have not won yet.

i wrote a query that is checking if a team has not won at all. but i'm trying to figure out how to count the points because every team play either at home or away.

thank you for you help.

here is the query the i have wrote so far:
select team.id, nickname,color
from team,points,game
where (team.tid = game.vtid and (vscore - hscore ) < 0)  or (game.htid = team.tid and (hscore - vscore )< 0 )
having

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux