Draft SQL for statistics for http://meta.stackoverflow.com/questions/134614
Q&A for scientists using computers to solve scientific problems
select v.creationDate VoteCreated, vt.name, p.id, p.creationDate PostCreated, DATEDIFF(ww, p.creationDate, v.creationDate) WeeksBetweenInitialContentAndVote from posts p, votes v, votetypes vt where v.postId = p.id and v.votetypeid = vt.id and p.owneruserid = 22656 and v.creationDate >= '2012-05-01' and v.creationDate <= '2012-05-31' and p.creationDate >= '2012-05-01' and p.creationDate <= '2012-05-31' -- The legend that is Jon Skeet: UserId = 22656 -- Jon Skeet 751 rows for votes received in May -- Jon Skeet 290 rows for votes related to posts posted in May -- 1=Question 2=Answer --select * --from posttypes -- 1=AcceptedByOriginator, 2=UpMod, 3=DownMod --select * --from voteTypes