Re: car mileage summation / sledgehammer method - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: car mileage summation / sledgehammer method
Date
Msg-id 20000817093842.A17023@rice.edu
Whole thread Raw
In response to Re: car mileage summation / sledgehammer method  (Maarten Boekhold <Maarten.Boekhold@reuters.com>)
List 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@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-sql by date:

Previous
From: Andreas Tille
Date:
Subject: Beginner problems with functions (Was: Is this the wrong list?)
Next
From: Joerg Hessdoerfer
Date:
Subject: Continuous inserts...