Even the simpler INSERT statement
INSERT INTO stats(uid, single_q_left)
SELECT player1, COUNT(*)
FROM games
WHERE hand1 = '{Q}'
GROUP BY player1
ON CONFLICT(uid) DO NOTHING;
produces the same error.
On Sat, May 5, 2018 at 4:49 PM, Alexander Farber <alexander(dot)farber(at)gmail(dot)com
> wrote:
> http://sqlfiddle.com/#!17/7e929/13
>
>