can you make an sql query for this situation?

Posted by saurav on Stack Overflow See other posts from Stack Overflow or by saurav
Published on 2010-03-18T08:49:16Z Indexed on 2010/03/18 8:51 UTC
Read the original article Hit count: 295

Filed under:

i have a table as below. name and 10 cities in which he lived during his lifetime.

name , city1 , city2 , city3 ,city4 , city5 ,city6 , city7 , city8 , city9 city10

suppose for a particular name i want to fetch other names in table matching with maximum number of cities. for example if i want to fetch other people who have lived in three or more cities lived by this person.

© Stack Overflow or respective owner

Related posts about mysql