SQLAlchemy – naked sql query

An example of a bare sql query in ORM SQLAlchemy.

result = db.engineexecute(
“” ”
array_agg (DISTINCT t.topic) as topic,
array_agg (t.user_ask)
FROM conversation_user t
GROUP BY t.topic
“” “

names = [[row[[1] for row in result]

Hello! You are on my site. I’m a developer. Here I share my best practices and knowledge. (Disclaimer) Ask in the comments if you don’t understand something or write if you have something to add.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *