尝试使用Plotalot图创建联赛表并显示。我正在使用BETWEEN子句,但我似乎没有得到我期望的结果,这是......没有结果!非常感谢对此的支持。
代码是
SELECT FieldName, COUNT(FieldValue) AS "Total"
FROM jos_rsform_submission_values
WHERE FieldName LIKE'Goals' AND "Total" BETWEEN 1 AND 20 ORDER BY Total DESC
答案 0 :(得分:0)
我希望您已经知道应该使用WHERE
语法的结果。
尝试不使用""
SELECT FieldName, COUNT(FieldValue) `Total`
FROM jos_rsform_submission_values
WHERE FieldName LIKE 'Goals' AND Total BETWEEN 1 AND 20 ORDER BY Total DESC
也可以使用子查询
完成SELECT * FROM
(
SELECT FieldName, COUNT(FieldValue) `Total`
FROM jos_rsform_submission_values
WHERE FieldName LIKE 'Goals'
) Sub WHERE Sub.Total BETWEEN 1 AND 20
ORDER BY Sub.Total DESC
尝试此查询以确保您的匹配项总数介于1到20之间
SELECT FieldName, COUNT(FieldValue) `Total`
FROM jos_rsform_submission_values
GROUP BY FieldName