Add support for WITH statements and Common Table Expressions.

This commit is contained in:
go-jet 2020-05-24 17:55:28 +02:00
parent 0d3ec872d6
commit fb8607da29
13 changed files with 406 additions and 39 deletions

View file

@ -1088,7 +1088,7 @@ SELECT customer.customer_id AS "customer.customer_id",
customer.create_date AS "customer.create_date",
customer.last_update AS "customer.last_update",
customer.active AS "customer.active",
customer_payment_sum."amount_sum" AS "CustomerWithAmounts.AmountSum"
customer_payment_sum.amount_sum AS "CustomerWithAmounts.AmountSum"
FROM dvds.customer
INNER JOIN (
SELECT payment.customer_id AS "payment.customer_id",
@ -1096,7 +1096,7 @@ FROM dvds.customer
FROM dvds.payment
GROUP BY payment.customer_id
) AS customer_payment_sum ON (customer.customer_id = customer_payment_sum."payment.customer_id")
ORDER BY customer_payment_sum."amount_sum" ASC;
ORDER BY customer_payment_sum.amount_sum ASC;
`
customersPayments := Payment.