我在经典 ASP 中使用的 MS SQL 语句遇到了一些问题。当我在 Microsoft SQL SMS 中使用该语句时 - 我得到了正确的答案 (4) 但在 ASP 中我只得到了结果 2..
我想要的结果是有多少不同的艺术家拥有一个或多个已发布的项目。
我使用的声明 -
SELECT Count(*) AS CountArtists
FROM Tekster
WHERE Published='True'
GROUP BY Artist
数据 - 表格(文本)
Artist - Published
Person1 yes
Person1 no
Person1 yes
Person2 yes
Person3 yes
Person3 no
Person3 yes
Person4 no
Person4 no
Person4 no
Person5 no
Person5 yes
Person6 no