将几个查询结果放在一个表中

select
(select count(*) from T_CATALOG_MESSAGE t where 1=1 and t.DATA_VALID_FLAG=‘1‘ and STATE=‘2‘
and YWTYPE in(‘1‘,‘2‘,‘3‘) and to_char(t.ins_time,‘yyyy-mm-dd‘)=‘2021-08-09‘)bdzs,
(select count(*) from T_CATALOG_MESSAGE t where 1=1 and t.DATA_VALID_FLAG=‘1‘ and STATE=‘2‘
and YWTYPE in(‘1‘) and to_char(t.ins_time,‘yyyy-mm-dd‘)=‘2021-08-09‘) addSum,
(select count(*) from T_CATALOG_MESSAGE t where 1=1 and t.DATA_VALID_FLAG=‘1‘ and STATE=‘2‘
and YWTYPE in(‘2‘) and to_char(t.ins_time,‘yyyy-mm-dd‘)=‘2021-08-09‘) changeSum,
(select count(*) from T_CATALOG_MESSAGE t where 1=1 and t.DATA_VALID_FLAG=‘1‘ and STATE=‘2‘
and YWTYPE in(‘3‘) and to_char(t.ins_time,‘yyyy-mm-dd‘)=‘2021-08-09‘) QxSum
from dual;

将几个查询结果放在一个表中

上一篇:Prothreads(超级轻量多任务)


下一篇:husky7 + eslint +prettier配置vue2.x 开发环境