votes

Mysql get count of rows for each day

My Current query is: SELECT DISTINCT DATE(vote_timestamp) AS Date, COUNT(*) AS TotalVotes FROM `votes` WHERE vote_target_id='83031' GROUP BY DATE(vote_timestamp) ORDER BY DATE(vote_timestamp) DESC LIMIT 30 (line breaks separated for readability) Where vote_timestamp is a time for each "vote", Count(*) is the count for that day, and ...

Sorting top votes in a timeframe using "Vote it up" and wordpress

I'm building a digg-like voting site for christmas greetings. I'm using wordpress and the "Vote it up" plugin. I am having alot of troubles being able to sort the vop votes within a timeframe. You can see what I mean on this site; http://wordtaps.com/ Look at the timeframe on the top right, that's exactly what I want. The site also use...

SQL get polls that specified user is winning

Hello all and thanks in advance I have the tables accounts, votes and contests A vote consists of an author ID, a winner ID, and a contest ID, so as to stop people voting twice Id like to show for any given account, how many times theyve won a contest, how many times theyve come second and how many times theyve come third Whats the faste...

When to use geometric vs arithmetic mean?

So I guess this isn't technically a code question, but it's something that I'm sure will come up for other folks as well as myself while writing code, so hopefully it's still a good one to post on SO. The Google has directed me to plenty of nice lengthy explanations of when to use one or the other as regards financial numbers, and thing...