postgres select count distinct multiple columns