: Avanced query question
Hello,
I have a question about a query. We have a guestbook and I want to do some
statistics for the messages in it. So I've created a query that looks like
this.
select hour(msg_date_time), count(*)
from messages
where user_id = 'almar'
group by hour(msg
* DL Neil
> Consider:
> a) add a 'construction' table with the row-values 0 through 11
> (or 23) and use it to do a left join against the
> messages tbl;
> b) if the database is not busy, use perl to fire off 12 (or 24)
> separate queries.
c) use perl to 'fill in the holes', putting zero values i
Hello Almar
> I have a question about a query. We have a guestbook and I want to do some
> statistics for the messages in it. So I've created a query that looks like
> this.
>
> select hour(msg_date_time), count(*)
> from messages
> where user_id = 'almar'
> group by hour(msg_date_time)
>
> It re
Hello,
I have a question about a query. We have a guestbook and I want to do some
statistics for the messages in it. So I've created a query that looks like
this.
select hour(msg_date_time), count(*)
from messages
where user_id = 'almar'
group by hour(msg_date_time)
It returns the hour and the
* DL Neil
> Consider:
> a) add a 'construction' table with the row-values 0 through 11
> (or 23) and use it to do a left join against the
> messages tbl;
> b) if the database is not busy, use perl to fire off 12 (or 24)
> separate queries.
c) use perl to 'fill in the holes', putting zero values i
Hello Almar
> I have a question about a query. We have a guestbook and I want to do some
> statistics for the messages in it. So I've created a query that looks like
> this.
>
> select hour(msg_date_time), count(*)
> from messages
> where user_id = 'almar'
> group by hour(msg_date_time)
>
> It re
Hello,
I have a question about a query. We have a guestbook and I want to do some
statistics for the messages in it. So I've created a query that looks like
this.
select hour(msg_date_time), count(*)
from messages
where user_id = 'almar'
group by hour(msg_date_time)
It returns the hour and the