Added support for intervals of time and granularity to ITS queries