无法计算多列

时间:2019-02-24 06:20:22

标签: sql where countif

我的代码是

{
    "timestamp": 1550987372934,
    "status": 100,
    "error": "No have content",
    "exception": "com.app.core.exception.AppException",
    "message": "No have content",
    "path": "/api/user"
}

我想在不同的列中计数相同的值

2 个答案:

答案 0 :(得分:0)

您可以计算id的数量

SELECT COUNT(id) AS none FROM college_votes ...

答案 1 :(得分:0)

您可以将btn.tag = 0 conditional aggregation应用于所有四个列:

SUM