Totally agree, I am not happy with `rating` as well, but as I said, I couldn't find any better solution. It would be great, if you could help to write a sql for that.