Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

in postgres how to select items that have a dupe across two columns

$
0
0

My data looks like this:

queryable_type   queryable_id 
User             1 
User             2
User             2

I’d like to return dupes so that my result would look like this:

queryable_type  queryable_id count 
User            2            2

I’m assuming some multiple group by but it wasn’t working.


Viewing all articles
Browse latest Browse all 1138

Trending Articles