extract customers with same hobbies with mysql query -


  customer IDs | Hobbies   

I would like to use mysql query to remove those who have the same hobby.
If anyone has more hobbies then we have a line for every hobby. > It is easy to use

  Select customers from customer where hobby = 'football'   

My problem is that I Want to find hobby.

For example ' football ' and ' swimming ' and the query should contain only customers who have both.

Is it possible to do this with query or should I use the stored procedure and how? Select the customer from the customer, where the number of 'amateur' ('swimming', 'football') is in the customer's name.



Comments

Popular posts from this blog

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -

jasper reports - How to center align barcode using jasperreports and barcode4j -

django - CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False -