Execute a query

Performs a query against the metrics data store and returns the results.