From: Ross J. Reedstrom <reedstrm@rice.edu>
To: pgsql-sql@hub.org
Subject: Re: car mileage summation / sledgehammer method
Date: Thu, 17 Aug 2000 09:38:42 -0500
Message-ID: <20000817093842.A17023@rice.edu> (raw)
In-Reply-To: <200008171159.e7HBxem98875@hub.org>
References: <200008171159.e7HBxem98875@hub.org>
On Thu, Aug 17, 2000 at 01:55:19PM +0200, Maarten Boekhold wrote:
>
> Now that's a bit stupid. Why create this view when you can do the same
> thing with a table alias (I'm I calling this by the right name?).
Now now, let's not call it stupid: how about 'not optimal'?
>
> select m.miles, m.date, sum(d.miles) from mileage m, mileage d
> where.......
>
This is the traditional way to do a self join, yes.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: reedstrm@rice.edu, pgsql-sql@hub.org
Subject: Re: car mileage summation / sledgehammer method
In-Reply-To: <20000817093842.A17023@rice.edu>
References: <200008171159.e7HBxem98875@hub.org> <20000817093842.A17023@rice.edu>
* 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