Protecting Private Information for Two Classes of Aggregated Database Queries