Added aggregate and join queries.