Add the word 'data' to second query selection to be more explicit
between Data Queries and Count Queries
Added error message that aggregation cannot be performed if one or more
queries fails.