1007 shaares
1 private link
1 private link
Je pose ça là.
Genre, j'aime beaucoup le select(c for c in Customer if sum(c.orders.price) > 1000)
qui devient
SELECT "c"."id"
FROM "customer" "c"
LEFT JOIN "order" "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."total_price"), 0) > 1000
Plus qu'à dégager psycopg2-parce-que-c'est-pas-lisible-bourdayl