pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Maarten Boekhold <Maarten.Boekhold@reuters.com>
To: Oliver Seidel <os10000@in-medias-res.com>
Cc: pgsql-sql@hub.org
Cc: vpaul@dohle.com
Cc: xy0xy0@earthlink.net
Subject: Re: car mileage summation / sledgehammer method
Date: Thu, 17 Aug 2000 13:55:19 +0200
Message-ID: <200008171159.e7HBxem98875@hub.org> (raw)




> View definition: SELECT mileage.miles, mileage.date FROM mileage;

> detail=# select mileage.miles, mileage.date, sum(dup.miles) from
>          mileage, dup
>        where
>    dup.date <= mileage.date group by mileage.date, mileage.miles
>     order by mileage.date;

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?).

select m.miles, m.date, sum(d.miles) from mileage m, mileage d
where.......

Maarten


-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.



view thread (4+ messages)  latest in thread

Message-ID: <200008171159.e7HBxem98875@hub.org>
Permalink:  ../200008171159.e7HBxem98875@hub.org/
Also on:    postgresql.org/message-id/200008171159.e7HBxem98875@hub.org

 · 

reply

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: Maarten.Boekhold@reuters.com, os10000@in-medias-res.com, pgsql-sql@hub.org, vpaul@dohle.com, xy0xy0@earthlink.net
  Subject: Re: car mileage summation / sledgehammer method
  In-Reply-To: <200008171159.e7HBxem98875@hub.org>
  References: <200008171159.e7HBxem98875@hub.org>

* 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