Help for construct Query

Поиск
Список
Период
Сортировка
От Viaris hotmail
Тема Help for construct Query
Дата
Msg-id Law10-OE45Q7LfVdLf200008b12@hotmail.com
обсуждение исходный текст
Список pgsql-novice
Hi all,

I have the following two tables, the table correo have the messages send
using the mail, the other table web have the message send using web.

I have the following query:

select SUBSTR(hora,1,2) as ho,count(*) as tot from web as a where
fecha='11/20/03' group by SUBSTR(hora,1,2);

select SUBSTR(hora,1,2) as ho,count(*) as tot from correo as a where
fecha='11/20/03' group by SUBSTR(hora,1,2);

my result is:

 hour | messages
------+---------
 00 |  35
 01 |   9
 02 |   4
 04 |   1
 05 |   9
 06 |  42
 07 | 132
 08 | 446
 09 | 505

But I need have only one query for both tables, I was trying but I can't,
how can I do it?

Thanks in Advanced.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Michael Grant
Дата:
Сообщение: Re: Postmaster running, psql not
Следующее
От: "Chris Boget"
Дата:
Сообщение: Re: Help for construct Query