dchanman/tinder-plus-plus

Get a list of matches involving users with particular interests at a certain location

Opened this issue · 0 comments

Parameters: (interest, location)

SELECT user1, user2 FROM Matches WHERE
    (
user1 IN
    (SELECT userID FROM Users WHERE location={location})
    AND
    user2 IN
    (SELECT userID FROM Users WHERE location={location})
)
    AND
    (
        user1 IN
    (SELECT userID FROM InterestedIn WHERE Interest={interest})
    AND
    user2 IN
    (SELECT userID FROM InterestedIn WHERE Interest={interest})
    )