I have a table Visited with 2 columns:
ID | City
ID is an integer, City is a string.
Note that none of the columns is a key by itself - we can have the same ID visiting several cities, and several different IDs in the same city.
Given a specific ID, I want to return all the IDs in the table that visited at least half of the places that the input ID did (not including themselves)
edit: We only count places that are the same. so if ID 1 visited cities a,b,c. ID 2 visited b,c,d. ID 3 visited c,d,e.
then for ID=1 we return only [2], because out of the three cities ID1 visited, ID3 visited only one