Hive两表count除法

select
    100 * different / total
  from
    (select
         count(*) as different
       from
         a, b
       where
         ........) t1,
    (select
         count(*) as total
       from
         a
       where
           .......) t2

猜你喜欢

转载自blog.csdn.net/zanlinux/article/details/110173964