2 つのクエリがあります。初め:
SELECT TOP 10 NewsItemTitle
, COUNT(1) AS CounterNews
FROM [ACTIVITY]
WHERE [UserLocation] = 'United States'
GROUP BY NewsItemTitle
ORDER BY CounterNews DESC
これを返します:
NewsItemTitle CounterNews
Afinan plan para casas con cuota de $180.000 por mes 5
The Exploratoreum's STEM seller 4
Witnesses at Hasan trial describe carnage of Ft. Hood shootings. 2
U.S. returns to FIFA top 20 after two-year absence 2
Sunnyvale: Police shoot and kill man; body of woman found inside house 1
...
[NewsItemUrl]
さらに、そのクエリにフィールドとを追加したいと思います[NewsItemPublisher]
。
SELECT [NewsItemUrl]
, [NewsItemPublisher]
FROM [ACTIVITY]
では、これら 2 つのクエリを 1 つにまとめるにはどうすればよいでしょうか。