It's actually a datetime field so it is accurate to a second.
Duplicates wouldn't really be my main problem
But I was wondering if there was a more efficient way of doing it, seeing as that sort of info would be in the index.
To put my original question in a simpler way, let's say I have a table like this:
Code:
ID RATING MOVIE
_________________________________________
1 6.98 The Emperor's New Clothes
2 8.34 Debbie and the Chocolate Factory
3 2.2 Five Happy Mice
4 4.0 Five Easy Pieces of Chocolate
5 1.78 Star Wars 7: The Five Wars
Let's say the user is viewing a page about "Five Happy Mice" with id of 3 and rating of 2.2
How would I find out where that rating ranks out of every movie in my database? What would be the most efficient way of doing it?
Bookmarks