<UP>

<SELECT>

rows:
select *,(CASE WHEN C = '' THEN 'USA' when C != '' THEN C ELSE null END) as caseC,(P/ E) as PER,(D/ E *100) as Payout ,(D/P * 100) as Y ,(P/W) as X ,((D/P*100)-(D/P*100)*xT/100) as YT from A left join Tx on xC = (CASE WHEN C = '' THEN 'USA' when C != '' THEN C ELSE null END) left join (select sS,sum(sH) as sum_sH from VAs group by sS) as SUM_A on S = SUM_A.sS left join VuP on S = uS where (CASE WHEN C = '' THEN 'USA' when C != '' THEN C ELSE null END) like '%%' and I = '' order by Y desc limit 0,10