Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

[If this isn't an issue specific to Stack Exchange Data Explorer, this question is on the wrong site.]

Select VoteTypeId, Count(*), DatePart(hour,CreationDate)
From Votes
Group By VoteTypeId, DatePart(hour,CreationDate)

returns count(*)=0 for all VoteTypeIds.

This is fixed by adding an as clause for the Count(*)!

share|improve this question
up vote 4 down vote accepted

This is a confirmed bug in data explorer which I will sort out pretty soon, if there is more than one column with the same name (or no name) the data rendered into the grid goes wacky.

So this works:

Select VoteTypeId, Count(*) as a, DatePart(hour,CreationDate) as b 
From Votes
Group By VoteTypeId, DatePart(hour,CreationDate)
share|improve this answer
OK, so a simpler example is SELECT @@VERSION, COUNT(*). – Mark Hurd May 29 '10 at 2:55
BTW The original query was confirming all Votes are dated, but without times. Is this just the data that was transferred or does SO really not record the time votes are awarded? – Mark Hurd May 29 '10 at 3:23
@Mark, they are scrubbed in the dump, as are the vote owners – waffles May 29 '10 at 3:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .