can now specify time range when querying aggregate data