日期:2014-05-17 浏览次数:20824 次
select airline,
sum(saleprice) as saleprice,
sum(airporttax) as airporttax,
sum(oiltax) as oiltax,
sum(ticketnum) as ticketnum,
sum(voyagenum) as voyagenum,
(saleprice / s) as saleper
from tb_app_airlinesale_d
where data_date = '20130101'
and date_type = 't'
and ticketstatus = '0'
group by airline
union
select 'total',
sum(saleprice) as s,
sum(airporttax) as a,
sum(oiltax) as o,
sum(ticketnum) as t,
sum(voyagenum) as v,
'a'
from tb_app_airlinesale_d
where data_date = '20130101'
and date_type = 't'
and ticketstatus = '0'
group by 'total'