I'm going to port the query engine to use these instead of the hardcoded sql