From: Peter T. Brown <peter@memeticsystems.com>
To: pgsql-sql@postgresql.org
Subject: making queries more effecient
Date: 01 Nov 2002 14:24:52 -0800
Message-ID: <1036189492.2013.16.camel@localhost.localdomain> (raw)
Hi. I have this query that I have been trying to reduce to a single
statement, but haven't figured out how. Am I missing something?
CREATE TEMP TABLE temp20561149207391 AS SELECT DISTINCT ON ("VisitorID")
"VisitorID","Type" FROM "ProgramEvent" WHERE "ProgramID" = 10 ORDER BY
"VisitorID","Created" DESC;INSERT INTO "VisitorPointer839" ("VisitorID")
SELECT temp20561149207391."VisitorID" FROM temp20561149207391 WHERE
temp20561149207391."Type" = 0
Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: peter@memeticsystems.com
Subject: Re: making queries more effecient
In-Reply-To: <1036189492.2013.16.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox