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

  • Home
  • SEARCH
  • 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 6730477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:24:48+00:00 2026-05-26T10:24:48+00:00

I have a MySQL database with, amongst others, contains a created_at column. The column

  • 0

I have a MySQL database with, amongst others, contains a “created_at” column. The column holds the unix timestamp for each entry. On some days, many entries have been made. On others, none. I want to compile a list of dates on which at least one entry was made into the database. I tried the following in phpMyAdmin (on Mysql 5.0) but it gives me an error.

SELECT UNIQUE(DATE_FORMAT(`created_at`, '%d/%m/%Y')) FROM `entries`

To circumvent the error, I removed the UNIQUE part, and tried:

SELECT DATE_FORMAT(`created_at`, '%d/%m/%Y') FROM `entries` WHERE entry_id = 3

This gave me back a NULL value, which is fault because the created_at value for entry_id 3 is 1298050881. Why don’t these two queries work?

Third, eventually, I would like to compile a list of the number of entries made per day, something like:

2011-10-16 1,432
2011-10-17   502
2011-10 18 3,533

For this, I need the first queries to work. So I’m asking for your help. Any help would be greatly appreciated 🙂

  • 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-05-26T10:24:48+00:00Added an answer on May 26, 2026 at 10:24 am

    Try a group by:

    SELECT
      date_format(created_at, '%d/%m/%Y') AS theDate, 
      count(*) as theCount
    FROM
      entries
    GROUP BY
      theDate
    HAVING theCount > 1;
    

    And if you wanted to order the result set just add the following to the end:

    ORDER BY theCount desc;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this MySQl database that has a table which contains a column that
I have a MySQL database called bookfeather. It contains 56 tables. Each table has
I have some MySQL databases that have several tables that contain (amongst others) some
I have a mysql database which as one of the fields contains a html
I have MySQL database, where I store the following BLOB (which contains JSON object)
I have a MySQL database table that contains an Article ID ( primary key
I have a mysql database that contains snippets of latex code, identified by a
I have a MySQL database with a table called subm_items The table contains the
I have a MySQL database in which each row represents an episode of a
I have a mysql database, in there I have 1 table. That table contains

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.