MySQL Forums
Forum List  »  Newbie

Re: Finding like rows based on one of two fields
Posted by: Paul Ille
Date: August 16, 2015 11:48AM

I think I figured it out, but I need to test more.

Is there a better way to do it than this or is this the way to go?

SELECT id, person_id, game_id, count(game_id) as games FROM persons_favorite_games
where person_id = '26' or person_id = '92'
group by game_id
having count(game_id) > 1

Options: ReplyQuote


Subject
Written By
Posted
Re: Finding like rows based on one of two fields
August 16, 2015 11:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.