sql >> Base de Datos >  >> RDS >> Mysql

ayuda de subconsulta mysql

Prueba esto:

select
    u.website,
    sum(e.ULVolume + e. DLVolume) as volume
from mytable e
left join mytable u on u.PID = e.PID and u.event ='update'
where e.Event = 'end'
group by 1;