3 ms·
Tested this out on Postgres and it works: SELECT name, count(1) FROM (VALUES ('Kev',12), ('Meg', 14), ('Kev', 14)) people(name, age) GROUP BY
by eatonphil 4y ago
Tested this out on Postgres and it works:
SELECT
name, count(1)
FROM
(VALUES ('Kev',12), ('Meg', 14), ('Kev', 14))
people(name, age)
GROUP BY
1
Produces: [[Kev, 2], [Meg, 1]].
But I don't get it. Could someone explain how this works?