Created
July 6, 2011 23:43
-
-
Save jbouse/1068614 to your computer and use it in GitHub Desktop.
pool.shares queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT username as address, | |
((COUNT(*) * POW(2,32))/900) as hashrate | |
FROM shares | |
WHERE our_result <> 'N' | |
AND UNIX_TIMESTAMP(time) BETWEEN (UNIX_TIMESTAMP(NOW())-900) | |
AND UNIX_TIMESTAMP(NOW()) | |
GROUP BY address; | |
SELECT username as address, | |
((COUNT(*) * POW(2,32))/10800) as hashrate | |
FROM shares | |
WHERE our_result <> 'N' | |
AND UNIX_TIMESTAMP(time) BETWEEN (UNIX_TIMESTAMP(NOW())-10800) | |
AND UNIX_TIMESTAMP(NOW()) | |
GROUP BY address; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment