Oracle - return multiple counts as one query

前端 未结 3 1870
迷失自我
迷失自我 2021-02-19 11:30

I have a couple of queries, detailed below. I\'d like to be able to run one SQL query which returns both counts, is this possible?

1.

select nvl(count(ro         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 12:04

    You could use a with statement:

    with
    count1 as (
    select ...
    ),
    count2 as (
    select ...
    )
    select tot1, tot2
    from count1, count2
    

提交回复
热议问题