数据库:Greenplum
查询语句:
select
net_type,count (a.*)
FROM
anrpt.rpt_label_info_1_prt_p_201908 a
WHERE
user_id IN (
SELECT
user_id
FROM
anrpt.LABEL_USERS_1_105610008
)
AND flag_acct = '是'
GROUP BY
net_type
```
结果:
"2G";4
查询语句:
select
net_type,count (*)
FROM
anrpt.rpt_label_info_1_prt_p_201908 a
WHERE
user_id IN (
SELECT
user_id
FROM
anrpt.LABEL_USERS_1_105610008
)
AND flag_acct = '是'
GROUP BY
net_type
结果:
"2G";227
"3G";14
-----------------
结果中cust_name字段全部为null
![图片说明](https://img-ask.csdn.net/upload/201911/28/1574912470_361380.png)