您的位置:首页 > 博客中心 > 数据库 >

sql查询,如何增加一列

时间:2022-03-14 04:15

select * from (
select ‘finish_order_info‘ as table_name,count(1)as num from fraudorder.finish_order_info where crt_dt between to_date(‘2014-12-24:00:00:00‘,‘yyyy-mm-dd,hh24:mi:ss‘) and to_date(‘2014-12-25:00:00:00‘) group by ‘finish‘ union all
select ‘discard_order_info‘ as table_name, count(1)as num from FRAUDORDER.discard_order_info where crt_dt between to_date(‘2014-12-24:00:00:00‘,‘yyyy-mm-dd,hh24:mi:ss‘) and to_date(‘2014-12-25:00:00:00‘)union all
select ‘raw_air_order_info‘ as table_name, count(1)as num from FRAUDORDER.raw_air_order_info where crt_dt between to_date(‘2014-12-24:00:00:00‘,‘yyyy-mm-dd,hh24:mi:ss‘) and to_date(‘2014-12-25:00:00:00‘)union all
select ‘app_air_order_info‘ as table_name, count(1)as num from FRAUDORDER.app_air_order_info where crt_dt between to_date(‘2014-12-24:00:00:00‘,‘yyyy-mm-dd,hh24:mi:ss‘) and to_date(‘2014-12-25:00:00:00‘)union all
select ‘unkown_order_info‘ as table_name, count(1)as num from FRAUDORDER.unkown_order_info where crt_dt between to_date(‘2014-12-24:00:00:00‘,‘yyyy-mm-dd,hh24:mi:ss‘) and to_date(‘2014-12-25:00:00:00‘)
);

热门排行

今日推荐

热门手游