Auto-build of the query. Not fully operational yet.