(
select levelCOUNT(*as Subtotal from T_UserInfo where VerSionID='V20081205002' group by Level 
)a,
(
select COUNT(*as total from T_UserInfo where VerSionID='V20081205002'
 得到的结果是:
level   Subtotal  total  (比例)
中      23              86        0.267441860465
低      26              86       0.302325581395
高      37              86        0.430232558139

如果a.Subtotal/b.total 则比例这一列显示为0;



(
select levelCOUNT(*as Subtotal from T_UserInfo where VerSionID='V20081205002' group by Level 
)a,
(
select COUNT(*as total from T_UserInfo where VerSionID='V20081205002'
最后的结果
level Subtotal  total  perTotal  
中      23              86        26.7%
低      26              86       30.2%
高      37              86        43.0%


相关文章:

  • 2021-12-25
  • 2021-11-14
  • 2021-11-14
  • 2021-09-17
  • 2022-01-29
  • 2022-02-02
  • 2022-01-10
  • 2021-11-25
猜你喜欢
  • 2021-09-17
  • 2021-09-17
  • 2021-11-14
  • 2021-07-22
  • 2021-12-02
  • 2021-10-10
  • 2022-02-20
相关资源
相似解决方案