Can anybody suggest how to convert this code into SQLAlchemy code?
ARRAY_AGG(DISTINCT (table.column_a, table.column_b)) AS label
Found the solution
from sqlalchemy import func
func.array_agg(func.distinct(table.column_a, table.column_b)).label('my_label')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With