Get votes to first questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

select v.PostId, v.VoteTypeId, v.CreationDate
from (
  select OwnerUserId, MIN(CreationDate) as firstdate
  from Posts
  group by OwnerUserID ) as latest
  inner join Posts as p on p.OwnerUserId = latest.OwnerUserId and p.CreationDate = latest.firstdate
  inner join Votes as v on v.PostId = p.Id
where
  convert(date, p.CreationDate) >= convert(date, ##Start:string##)
  AND convert(date, p.CreationDate) <= convert(date, ##End:string##)
  AND p.PostTypeId = 1

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results