Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:19:44+00:00 2026-06-05T03:19:44+00:00

So i have a whole load of votes going into a voting system. I

  • 0

So i have a whole load of votes going into a voting system. I want to display how many votes i have in any one day. But i also want to then, display the amount of votes per day and spit out which day they were voted on, i.e 24k votes on 05/06/12, 27k votes on 06/06/12

SELECT count(*) AS count
FROM results 
GROUP BY DAY(datesubmitted), YEAR(datesubmitted), MONTH(datesubmitted) 
ORDER  BY DAY(datesubmitted) DESC, YEAR(datesubmitted) DESC, MONTH(datesubmitted) DESC

Is my query, i tried to add something like

DAY(FROM_UNIXTIME(datesubmitted)) as order_day

but this just throws a null which i found interesting as i’d expect the query to fail as there aren’t any outers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:19:47+00:00Added an answer on June 5, 2026 at 3:19 am

    So just saw a new answer but for me how i got it working was:

    SELECT count(*) AS count, DAY(datesubmitted) AS newday, 
    YEAR(datesubmitted) as newyear ,MONTH(datesubmitted) as newmonth
    FROM results 
    GROUP BY DAY(datesubmitted), YEAR(datesubmitted), MONTH(datesubmitted) 
    ORDER  BY  YEAR(datesubmitted) DESC, MONTH(datesubmitted) DESC, DAY(datesubmitted) DESC
    

    This way i get the correct ordering with year, month and day properly and also it displays the dates. I could concat them, but thats for another day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have whole bunch of <div class=productlistname><a href=#>The Text!</a></div> . What I want to
I have a whole list of package and I want the user to select
I have a whole bunch of projects which I want to reuse between the
I have tried so many different soloutions but cannot get this to work Here
I have a UITableView whose cells contain custom ImageViews that asynchronously load the images
I am looking to load results from the server for UITableView while I have
i have tried to to load the data to text box, while selecting the
I have a URL list of jar files, also I have whole path classname
I have a whole bunch of buttons that all need to have both a
We have a whole catalogue of videos which we would like to stream to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.