In my Table of TEAMS with relational table>rows for its PLAYERS
Each Team has 3 or more players Each Player associated with the team has a points column
I need to retrieve only the TEAM w/c has accumulated player points of 300 or greater
I have gone to this point so far:
Problem with this is it returns a result set contain ALL the rows in the TEAMs table.
How do I make it return result only if SUM is > than , say, 300?
I tried adding:
**WHERE total_points >= '300'**
but obviously that returns an "unknown column" error.
Any ideas?
PS I could easily get what i want via PHP > loop but it's such a waste on Server resource to be loading THOUSANDS of Team rows just to get a few that meets a criteria..