List:General Discussion« Previous MessageNext Message »
From:Mogens Melander Date:April 29 2007 7:00am
Subject:Re: how to query this sql?
View as plain text  
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;


Mogens Melander
+45 40 85 71 38
+66 870 133 224

This message has been scanned for viruses and
dangerous content by OpenProtect(, and is
believed to be clean.

how to query this sql?Jeff Pang29 Apr
  • Re: how to query this sql?Mogens Melander29 Apr