> can you perhaps illustrate a code example of what you would like to do ?
I have tried the following approach out for the software “SQLAlchemy 1.3.2” together with the engine “sqlite:///:memory:”. … q = session.query(action.statement1, action.statement2, action.name, action.source_file, func.count("*").label("C") ).group_by(action.statement1, action.statement2, action.name, action.source_file) \ .having(func.count("*") > 1) ct = 'create table t2 as ' + str(q.statement) sys.stderr.write("Command: " + ct + "\n") session.execute(ct) … Now I wonder about parameter specifications in the generated SQL command (and a traceback with the corresponding error code “http://sqlalche.me/e/cd3x”). Command: create table t2 as SELECT …, statements.source_file, count(:count_1) AS "C" FROM … GROUP BY … HAVING count(:count_2) > :count_3 Which details should be adjusted a bit more here? Regards, Markus -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.