Fixed aggregation time. Added more syntax to query parser