To get a list of user IDs with more than one purchase, you can do the following, which will have access to only one table:
user_ids = PurchasedDeal.count(:group => :user_id, :having => 'count_all > 0').keys
Subsequently, you can get all of these users:
users = User.find user_ids
Things can be sped up with a cache counter. In your user model, add the option :counter_cache => true to the has_many association for acquired transactions. You will need an additional integer column in your users table and initialize, which may look like this during migration:
add_column :users, :purchased_deals_count, :integer, :null => false, :default => 0 User.each { |u| User.reset_counters u, :purchased_deals }
Once this is set aside, it will become much easier:
users = User.all :conditions => 'purchased_deals_count > 0'
Rails will save a column for you with most of the standard operations.
To get the total price, the connection will always be included. Or you can build a hash of transaction prices and perform tedious processing in Ruby. I'm not an SQL expert, but you can get rid of the join by saving the price with BuyasedDeal. Otherwise, here's how to do it with the connection:
user_id_to_price = PurchasedDeal.sum 'deal.price', :include => :deal, :group => :user_id
You can filter this out only for users by adding something like :conditions => ['user_id IN (?)', users] . (Where users can be a list of identifiers as well as User objects.)