I have a User, Book and UserBooks releation table. UserBooks table like this
|UserID | BookID | Status |
1 34 Read
1 35 Unread
2 34 Read
2 70 Read
2 32 Unread
...................
My domain classes are User,Book and UserBook. in NHibernate how can I get top 10 most read books and their read count by users?
Top 10 Read Books
| BookID | ReadCount |
34 2
70 1
...............