I have a doubt regarding analytic functions. I've been working with some functions, but I can't achieve the one wich gives me the pretend result. I know to resolve this without using a function, with a internal select, but I think the analytical function is faster and proper.
with src as (
select 'A' Brand, 150 Qt from dual union all
select 'B', 200 from dual union all
select 'C', 50 from dual union all
select 'D', 100 from dual
qt / ( sum( qt ) over () ) * 100 "Overall %"