Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT t.id AS id, t.name AS name,
- (select count(id) from person where person.tags @> array[t.id]) as instances_count
- FROM tag AS t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement