select code,name,ttlmoney,count(*) over(order by rownum) amount from (select t.code,t.name,sum(s.unit_price*s.qty) as ttlmoney from tbl_father t,tbl_son s where t.id = s.id group by t.code,t.name)
over(order by rownum) 是什么意思啊?
select code,name (select t.code,t.name,sum(s.unit_price*s.qty) as ttlmoney from tbl_father t,tbl_son s where t.id = s.id group by t.code,t.name)
(select t.code,t.name,sum(s.unit_price*s.qty) as ttlmoney
from tbl_father t,tbl_son s
where t.id = s.id
group by t.code,t.name)
from tbl_father t,tbl_son s
where t.id = s.id
group by t.code,t.name)