Hope this resolves:
User.find(:all, :conditions => ['rich is true'], :select => 'distinct book_name', :include =>[:books])
Hope this resolves:
User.find(:all, :conditions => ['rich is true'], :select => 'distinct book_name', :include =>[:books])
If you just need the names of books for rich users ... then you need to add user_id column to books table, then give your regular query for books table directly.