Re: car mileage summation / sledgehammer method

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-sql(at)hub(dot)org
Subject: Re: car mileage summation / sledgehammer method
Date: 2000-08-17 14:38:42
Message-ID: 20000817093842.A17023@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Poul L. Christiansen 2000-08-17 14:50:00 Re: Continuous inserts...
Previous Message Joerg Hessdoerfer 2000-08-17 14:30:30 Continuous inserts...