New MIN/MAX functions that accepts any expression type.

This commit is contained in:
go-jet 2019-09-30 14:42:04 +02:00
parent 4b86e8f0ca
commit e09c78dec3
6 changed files with 46 additions and 0 deletions

View file

@ -87,7 +87,9 @@ SELECT customer.customer_id AS "customer.customer_id",
customer.last_update AS "customer.last_update",
SUM(payment.amount) AS "amount.sum",
AVG(payment.amount) AS "amount.avg",
MAX(payment.payment_date) AS "amount.max_date",
MAX(payment.amount) AS "amount.max",
MIN(payment.payment_date) AS "amount.min_date",
MIN(payment.amount) AS "amount.min",
COUNT(payment.amount) AS "amount.count"
FROM dvds.payment
@ -103,7 +105,9 @@ ORDER BY payment.customer_id, SUM(payment.amount) ASC;
SUMf(Payment.Amount).AS("amount.sum"),
AVG(Payment.Amount).AS("amount.avg"),
MAX(Payment.PaymentDate).AS("amount.max_date"),
MAXf(Payment.Amount).AS("amount.max"),
MIN(Payment.PaymentDate).AS("amount.min_date"),
MINf(Payment.Amount).AS("amount.min"),
COUNT(Payment.Amount).AS("amount.count"),
).