1.机型统计
sql ="select 机型, sum(进港) as 进港,sum(出港) as 出港,sum(进港)+sum(出港) as 小计 " \
"from (select b.a10 as 机型, count(*) as 进港, 0 as 出港 from (select * from app_airdata) b " \
"where b.d0 = 202009240500 and b.a2 = 0924 and b.a13 like '%s' group by b.a10 " \
"union all" \
" select c.a10 as 机型, 0 as 进港, count(*) as 出港 from (select * from app_airdata) c " \
"where c.d0 = 202009240500 and c.a2 = 0924 and c.a18 like '%s' group by c.a10) " \
"a group by 机型 with rollup"%(das,das)