現在有一張表,表名為t_tq,我要根據P_ORGNAME分組來查詢OPER_NAME和ORG_NAME的數量,這個SQL該怎么寫?
uj5u.com熱心網友回復:
select P_ORGNAME, count(distinct OPER_NAME), count(distinct ORG_NAME) from tab group by P_ORGNAME轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/253622.html
標籤:開發
上一篇:史上超強最常用SQL陳述句大全
