I have oracle tables like below:
User - UserId,
Item - ItemId,
UserVote - UserVoteId, UserId, ItemId.
Now a user can vote multiple times. I am having a hard time with this query: Get item(s) most voted uniquely – meaning multiple votes from the same person count only as one.
If it was SQL Server, I might have created temp table and all, but I do not know how to handle in Oracle. I’m also having a hard time thinking how to handle tie, meaning if two items both have 18 “unique” votes. I would want both items in that case.
1 Answer