sql - 每次应用 WHERE 子句时,每个省的 COUNT 总是失败
问题描述
所以我需要计算每个省有多少不活跃的客户,但是每次我使用 where 子句设置过滤器时它总是“查询没有结果”。任何人都知道如何摆脱这个问题?
SELECT a.province, count(t.customer_id) as total_customer_on_each_province
FROM total_customer t
LEFT JOIN last_address a on a.customer_id = t.customer_id
WHERE t.status = 'INACTIVE'
GROUP BY province
解决方案
推荐阅读
- python - 比较所有元素是否相等
- python - TypeError: tuple - keras 自定义错误上的元组
- html - 使用 purrr / map 将自定义函数(创建 HTML 表)应用于数据框的每一列
- javascript - iframe 中的图像上的超链接(javascript、传单)
- c# - 忽略编译器错误 BC30668:“此版本的编译器不支持具有嵌入式引用的类型”
- node.js - Axios 正在获取数据,但我似乎没有在前端正确显示它
- azure - 物联网边缘报告客户端状态的时间线
- android-layout - 有没有办法在 Android 的可穿戴设备中创建类似可拖动菜单的东西?
- ssl - 执行服务请求 OSB/WEBLOGIC 时出现 SSL 错误 (unexpected_message)
- powershell - 如何在power shell中逐字读取文件?