如何在分组时拆分列

时间:2017-07-10 05:26:54

标签: mysql sql

Example

pic的sql是:

SELECT pv_nwgp_provider.network_group_id,
       pv_provider.is_facility,
       COUNT(pv_nwgp_provider.provider_id) AS totalCount
FROM pv_nwgp_provider, pv_provider
WHERE     pv_nwgp_provider.provider_id = pv_provider.provider_id
      AND pv_nwgp_provider.network_group_id = 3
GROUP BY pv_nwgp_provider.network_group_id, pv_provider.is_facility
LIMIT 1000    

我应该做些什么来重新开始:

network_group_id   Y     N
     3            811   9924

0 个答案:

没有答案