我有这个问题:
select count(id) AS num,date_id from table
where FROM_UNIXTIME(date_id,'%d-%m-%Y')='17-08-2009' order by date_id DESC;
Run Code Online (Sandbox Code Playgroud)
这应该导致在今天的日期发布所有id,但它只给出一个id(最高的id).当我count(id)从这个查询中删除它,它运行正常.
为什么这个计数不能用于此查询?