Received: from merlin.inspire.net.nz (merlin.inspire.net.nz [203.96.157.130]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA77811 for ; Fri, 14 Apr 2000 00:48:59 -0400 (EDT) (envelope-from gmerrall@email.com) Received: from home (james.inspire.net.nz [203.96.157.137] (may be forged)) by merlin.inspire.net.nz (8.9.3/8.9.3) with SMTP id QAA02449 for ; Fri, 14 Apr 2000 16:46:51 +1200 (NZST) Message-ID: <004001bfa5cd$b1d0e7c0$899d60cb@inspire.net.nz> Reply-To: "Graeme Merrall" From: "Graeme Merrall" To: Subject: sum a subquery? Date: Fri, 14 Apr 2000 16:55:45 +1200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003D_01BFA632.46AA3A40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200004/151 This is a multi-part message in MIME format. ------=_NextPart_000_003D_01BFA632.46AA3A40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dunno if this is the right way to ask a question but... I'm inheriting some data and need to perform a query on it to sum a column = of figures. The only problem I have to sum on the condition of the contents= of another column. e.g. 12.23 I 23.45 P 56.67 I 11.11 P SO I need to sum all the I's and all the P's. Is it possible to use a sub-s= elect to do this or what. I've a feeling I'm messing around in the right a= rea but can't quite get it together. Cheers, Graeme ------=_NextPart_000_003D_01BFA632.46AA3A40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dunno if this is the right way to ask a qu= estion=20 but...
I'm inheriting some data and need to perfo= rm a=20 query on it to sum a column of figures. The only problem I have to sum on t= he=20 condition of the contents of another column.
e.g.
 
12.23  I
23.45 P
56.67 I
11.11 P
 
SO I need to sum all the I's and all the P= 's. Is it=20 possible to use a sub-select to do this or what. I've  a feeling I'm= =20 messing around in the right area but can't quite get it together.
 
Cheers,
 Graeme
------=_NextPart_000_003D_01BFA632.46AA3A40--