时间:2021-07-01 10:21:17 帮助过:283人阅读
SELECT count(1) AS matCount,CS.CS_DBID,CS.CS_SHOP_NAME FROM
PROJECT_PLAN_REQ_DETAIL AS PPRD
INNER JOIN GOODS_INFO AS GI ON
PPRD.PLAN_MAT_CODE = GI.GOODS_MAT_CODE
INNER JOIN COMP_SHOP AS CS ON GI.CS_DBID = CS.CS_DBID
WHERE PPRD.PLAN_PURCHASE_ID = ‘7cd13f026f794d4ba954b7c73901782c‘
GROUP BY CS.CS_DBID,CS.CS_SHOP_NAME
SQL连表查询并统计数量
标签:sel group detail HERE 统计 查询 lan where sql