SELECT imps.Interest_name as PopularInterests,
imps.SUM(Count) AS Total_Count,
ints.Vertical_Name
FROM Impressions imps
INNER JOIN Interests ints ON imps.Interest_name = ints.Interest_name
GROUP BY imps.Interest_name
HAVING imps.SUM(Count) > 10000;
查询给我的错误:问题与功能
Lookup Error - SQL Server Database Error: Cannot find either column "imps" or the user-defined function or aggregate "imps.SUM", or the name is ambiguous
我的表如下所示:
印象:
Interest_Name Count
Geo_934293 1107
Geo_934293 852
Geo_934293 934
Geo_8133957 1810
Geo_8133957 909
Geo_8133957 463
Geo_8133957 736
Geo_8133957 7000
垂直行业:
Interest_Name Vertical_Name
Geo_934293 X
Geo_8133957 Y
和预期的结果将是:
Popular_Interest Total_Count Vertical_Name
Geo_8133957 10918 Y
不知道我要去的地方错了吗?我认为它与SUM
函数有关。
_imps.SUM(计数)> 10000_这是什么? –
SUM(Imps.count) – mohan111