Open talpa opened 4 years ago
You could put the whole thing in a literal
db.From("x").Select(goqu.L(`SUM(adi.amount) FILTER (WHERE ad.document_status='pending')`)).As("unpaid_document_sum")
SELECT SUM(adi.amount) FILTER (WHERE ad.document_status='pending')
FROM "x"
Hi great author:) Dialect
Thanks Ales