Bounty amount with user count before/after 2010-06-18

0

Please login or register to vote for this query.

(click on this box to dismiss)

Code to retrieve the count of bounties and users before and after any user-any bounty change.

Anime and Manga

Q&A for anime and manga fans

-- Bounty amount with user count before/after 2010-06-18
-- Code to retrieve the count of bounties and users before
-- and after any user-any bounty change.

SELECT 'Before' 'befaf',
       COUNT(*) bounties,
       (SELECT COUNT(*) FROM Users WHERE CreationDate <= '2010-06-18') 'Users registered'
  FROM Votes
 WHERE CreationDate <= '2010-06-18'
   AND BountyAmount IS NOT NULL
UNION ALL
SELECT 'After',
       COUNT(*),
       (SELECT COUNT(*) FROM Users WHERE CreationDate > '2010-06-18')
  FROM Votes
 WHERE CreationDate > '2010-06-18'
   AND BountyAmount IS NOT NULL
UNION ALL
SELECT 'Total',
       COUNT(*),
       (SELECT COUNT(*) FROM Users)
  FROM Votes
 WHERE BountyAmount IS NOT NULL

Enter Parameters

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