I'm wondering if I can perform a group by, and select a different subset of rows for each aggreate function. Example:
select order, count(*), sum(*), avg(*)
from table_orders
group by order
I'd like to restrict the rows used by each aggreate function using different conditions, like
count(*) where order_price > 100
sum(*) where order_id < 200
avg(*) where other_condition
Thank you all!