pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yasir Malik <ymalik@cs.stevens-tech.edu>
To: Ali Adams <aliadams@doit4u.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: help yourself by helping others
Date: Thu, 10 Jul 2003 08:25:13 -0400
Message-ID: <Pine.SGI.4.51.0307100819130.4280122@guinness.cs.stevens-tech.edu> (raw)
In-Reply-To: <001c01c2fa9b$5b91ec80$03000000@DELLPC>
References: <001c01c2fa9b$5b91ec80$03000000@DELLPC>

I'll try.
In your report, I do not understand how you are getting the withdrawls.
For example, in  your table, you have for machine 1, day one of January,
1101 withdrawls but that does not show in your report.  And what is the
relation of id to machine?
Yasir

On Fri, 4 Apr 2003, Ali Adams wrote:

> Date: Fri, 4 Apr 2003 12:10:06 +0100
> From: Ali Adams <aliadams@doit4u.com>
> To: pgsql-sql@postgresql.org
> Subject: [SQL] help yourself by helping others
>
> Dear All,
>
> I am new to Relational Databases and SQL and my background in ODBs is clouding my way to solving what seems to be a simple problem. I am sure many of you have met it many times.
>
> OK, I have a table as follows:
>
>
> ID Machine   Date             Withdrawals
> 1  1              01/01/2003    1101
> 2  2              01/01/2003    2101
> 3  3              01/01/2003    3101
>
> 4  1              02/01/2003    1102
> 5  2              02/01/2003    2102
>
> 6  1              03/01/2003    1103
> 7  3              03/01/2003    3103
>
> 8  2              04/01/2003    2104
> 9  4              04/01/2003    4104
>
> And i would like to create a monthly withdrawals report as follows:
>
> Machine   Day1  Day2  Day3  Day4 .............................................. Day31
> 1             11      12      13       0                                                      0
> 2             21      22      0        24                                                     0
> 3             31      0        33       0                                                      0
> 4              0        0       0         0                                                     0
>
> Can you please help?
>
> Many thanks in advance.
>
> Ali
> <help yourself by helping others>
> www.geocities.com/aliadams
>



view thread (8+ messages)  latest in thread

Message-ID: <Pine.SGI.4.51.0307100819130.4280122@guinness.cs.stevens-tech.edu>
Permalink:  ../Pine.SGI.4.51.0307100819130.4280122@guinness.cs.stevens-tech.edu/
Also on:    postgresql.org/message-id/Pine.SGI.4.51.0307100819130.4280122@guinness.cs.stevens-tech.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ymalik@cs.stevens-tech.edu, aliadams@doit4u.com
  Subject: Re: help yourself by helping others
  In-Reply-To: <Pine.SGI.4.51.0307100819130.4280122@guinness.cs.stevens-tech.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