I'm trying to write a query for a golf database. It needs to return players who have statisticID = 1
with a p2sStatistic > 65
and who also have statisticID = 3
with p2sStatistic > 295
.
One statisticID
is driving distance, the other accuracy, etc. I've tried the following but it doesn't work and can't seem to find an answer online. How would I go about this without doing a view?
SELECT playerFirstName, playerLastName
FROM player2Statistic, player
WHERE player.playerID=player2Statistic.playerID
AND player2Statistic.statisticID=statistic.statisticID
AND p2sStatistic.3 > 295
AND p2sStatistic.1 > 65;
https://i.stack.imgur.com/fR5OL.png - pic of db
Trying to get it just output the list of players that satisfy those two conditions.