Combining two SELECTs - Mailing list pgsql-general

From Eric Jain
Subject Combining two SELECTs
Date
Msg-id NCBBJFHBEGOIAHBCBNCLMEGMCIAA.jain@gmx.net
Whole thread Raw
Responses Re: Combining two SELECTs
Re: Combining two SELECTs
List pgsql-general
Any ideas how the following two statements could be combined into a
single one?

This would greatly simplify the integration of this query into an
existing web interface...

SELECT DISTINCT host, url, id
INTO TEMP
FROM log
WHERE
  host IN (SELECT host FROM robots)
  AND status IN (200, 304);

SELECT host, COUNT(*) AS hits
FROM TEMP
GROUP BY host
ORDER BY hits DESC;


--
Eric Jain


pgsql-general by date:

Previous
From: "John Daniels"
Date:
Subject: Re: Revised Copyright: is this more palatable?
Next
From: "planx plnetx"
Date:
Subject: REFERENCES troubles