Re: [GENERAL] Combining two SELECTs

2000-07-05 Thread Guillaume Perréal
Tom Lane wrote: > > "Eric Jain" <[EMAIL PROTECTED]> writes: > > Any ideas how the following two statements could be combined into a > > single one? > > > SELECT DISTINCT host, url, id > > INTO TEMP > > FROM log > > WHERE > > host IN (SELECT host FROM robots) > > AND status IN (200, 304); >

Re: [GENERAL] Combining two SELECTs

2000-07-05 Thread Tom Lane
"Eric Jain" <[EMAIL PROTECTED]> writes: > Any ideas how the following two statements could be combined into a > single one? > 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 TE