WITH days AS (SELECT Votes.CreationDate FROM Votes, User...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language Learners

Q&A for speakers of other languages learning English

-- Enter Query Title
-- Enter Query Description

WITH days AS (SELECT Votes.CreationDate FROM Votes, Users WHERE Users.Id = ##UserId## AND Votes.CreationDate >= Users.CreationDate GROUP BY(Votes.CreationDate))

-- CREATE TABLE #rep(Date datetime, RecentUpvotes int, OldUpvotes int)

-- DECLARE c CURSOR FOR SELECT * FROM days ORDER BY CreationDate
-- OPEN c

-- DECLARE @day datetime
-- FETCH NEXT FROM c INTO @day
-- WHILE @@fetch_status = 0 BEGIN

-- FETCH NEXT FROM c INTO @day
-- END
-- CLOSE c
-- DEALLOCATE c

SELECT * FROM days

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results