Jump to content

Comparing a single tables records to find number of differences


masscrazy

Recommended Posts

So i have a SINGLE table with user track and rating columns. I have say 11 records 5 records by 1 user and 6 by the other. I need to know if both have rated the the same tracks and count if any are different or not, so if they both rated the same tracks then only 1 would be counted as different since the 11th record hasnt been rated by one user.

 

if i have sets(user, track) a(1,2,3) b(1,2,3) and count the difference, it should be 0 since there is not difference and if the sets a(1,2,3) b(1,2,3,4) the number should be 1 for there is only 1 different to set a.

 

How would i represent this in mysql.

 

 

(check thttp://forums.mysql.com/read.php?52,121807,121807#msg-121807 and its replies, it might help you to answer the question)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.