Currently, the table has a post table that contains the create_dateint (11) field and stores the posting timestamp. I need an SQL statement to query the number of posts per day, what good SQL queries can be recommended? The current table has a post table
Create_date int (11)
The type of field stores the posting timestamp. I need an SQL statement to query the number of posts per day. What good SQL queries can be recommended?
Reply content:
The current table has a post tableCreate_date int (11)
The type of field stores the posting timestamp. I need an SQL statement to query the number of posts per day. What good SQL queries can be recommended?
Select DATE_FORMAT (FROM_UNIXTIME (create_date) as r_date, count (*) from table_name where DATE_FORMAT (FROM_UNIXTIME (create_date), "% Y-% m-% d % H: % I: % s ") between" 2014-11-21 "and" 2014-11-22 "group by r_date;