trying to generate the standalone SQL using sqlalchemy. introducing new problems
bring back the old hand coded sql so I can test against it, JSONly
Revert "bring back the old hand coded sql so I can test against it, JSONly"

This reverts commit 95f75954578d53b591eb70677f21936ff3a56b55.
tweaked graph_val queries
fix hirev_graph_val related error in generated sql

I still can't entirely explain what the error was, I think it had to do with using one form of the query when I wanted another ...
Now the create-table and create-index statements are precompiled with sqlalchemy, too
I am actually testing by using LiSE. Proper unit tests would be a good idea but...later.