On Sun, April 29, 2007 05:28, Jeff Pang wrote:
> Hello list,
> I want to get the counter for db-items by each day,so I wrote this sql:
> select count(*) as dd from items group by updatetime;
> But sorry "updatetime" is "datetime" type,not "date" type.Then I can't get
> the correct result.
> How can I do this?Thanks.
That would be
select date(updatetime) ut, count(*) dd
from items group by ut;
+45 40 85 71 38
+66 870 133 224
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.