質問
私は、以下のクエリするの数を返します。 android 質問/各日StackOverflowの2011年.用していただきたいと思います。質問に期2011.これを使用してい ROLLUP
.
select
year(p.CreationDate) as [Year],
month(p.CreationDate) as [Month],
day(p.CreationDate) as [Day],
count(*) as [QuestionsAskedToday]
from Posts p
inner join PostTags pt on p.id = pt.postid
inner join Tags t on t.id = pt.tagid
where
t.tagname = 'android' and
p.CreationDate > '2011-01-01 00:00:00'
group by year(p.CreationDate), month(p.CreationDate),day(p.CreationDate)
with rollup
order by year(p.CreationDate), month(p.CreationDate) desc,day(p.CreationDate) desc
これは、出力:
全ての質問にそれぞれの日における2011年は表示されているのQuestionsAskedToday列そのものです。
があるので、表示、rollupを新しいカラムエイリアス?
正しい解決策はありません
所属していません StackOverflow