Proposal for Query system

This is a proposal for a query language and implementation plan for it.  @cheddar and @jh-bate -- your comments would be appreciated.
If no timezone is specified, it will default to UTC?