Saku Ytti wrote:
>
> I have timestamp(14) variable, let's call it bar, table shall be foo.
> I'd like to sort according to date, not whole timestamp, so that
> year/month/day match. And only display each date once, and report
> how many matches there were, sorted. Something like:
>
> select *, count(*) from foo group by bar;
> How to implement order? I only managed to get syntaxt error.
>
> --
> --ytti - ::3585:0512:1378
Hi Ytti
Use somthing like:
SELECT
DATE_FORMAT( bar, '%Y%m%d' ) as Date
, COUNT(*)
FROM
foo
GROUP BY
Date
Tschau
Christian
PS: Sorry for the late answer, I was on vacation.