OOP Question regarding query database or objects

Mar 8, 2010 at 11:15 AM

What is best practice in the following situation...

I have a collection of drugs with sales values in different countries.  I need to write a method to return a drug that has the most sales totaled from all the countries.  Do I write a query against the database, or do I build a method against the object?  Is their a general rule to know when to query against the collections or the database?