Hi and thank you again for looking into this question.
I have one mysql table for visitors. They can add their favorite singers to a list. So the table looks very simple:
user_artist_favorites
id
user_id
artistName
Let’s say Moonwalker got 4 favorite singers:
1. Michael Jackson
2. Elvis Presley
3. Ray Charles
4. Stevie Wonder
The user Tester got also 4 favorite singers:
1. Michael Jackson
2. Ray Charles
3. Stevie Wonder
4. Lady Gaga (sorry folks)
What I would like to do now is compare the two users and output something like: Moonwalker & Tester have 75% the same taste in music.
How to start? Can anyone point me to the right direction please?
Thanks in advance for any help you can provide.
The first part of the Union All query returns the percent that Tester is like Moonwalker. The second query returns the percent that Moonwalker is like Tester.