Use sqlalchemy.sql.text to run raw query in CLI

Switch from "?" based SQLite / PostgreSQL style parameter to using sqlalchemy's SQL paramater compatibility layer.