Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ComodoHacker
· 3y ago · 0 comments
You can do that with standard aggregates by comparing min() and max().
Comments
[–]
nerdponx
3y ago
Or sometimes you can do something like FIRST() OVER (ORDER BY NULL).
[–]
GolDDranks
3y ago
I don't think that errors if the group contains different values...?
[–]
masklinn
3y ago
In postgres you can array_agg(distinct) and error on the application side if there is more than one value.