Using Select Alias in where clause
There are several issues with the query. FROM and column expression are misplaced, "games_played.*"  is not doing what it looks like, inner join instead of outer join, etc.

Try this one (I assume that (id) is the primary key of games):

select
    games.*, 
    count(games_played.*)
        as count,
    count(*) filter (where games_played.player_id = 1) &gt; 0
        as played
from games
    left join games_played
    on games_played.game_id = games.id
group by 
    games.id
order by
    games.id ;


Test at dbfiddle.uk