Oracle
 sql >> Database >  >> RDS >> Oracle

Come posso eseguire questo aggregato?

Devi group i dati; ad esempio:

select c.name,c.id,sum(o.amount) as amount
from CUSTOMERS c
inner join ord o on c.id=o.customer_id
group by c.id, c.name