Hey there!
I need help writing a special SQL query.
I have a table of Events, every event contains a user-id, which is the id of the creator.
Every user in my website chooses 3 colors he likes. I want to select Events from the events table,
ordering it by colors match - an event, which it's creator's colors match my colors best, will be "ranked" higher.
For example, if John created an event X, and John's colors are Green, Red and Yellow, and my colors are Red, Orange and Yellow,
his event will be higher in the results list, than event which Paul created, because Paul's favorite colors are Black, Blue and Red.
There is a users-colors table, which consists of user-id and color-id.
I hope I explained myself best.
Thanks in advance!