Need query help [message #21091] |
Thu, 11 July 2002 20:39 |
JSlick
Messages: 15 Registered: July 2002
|
Junior Member |
|
|
I need some help forming a query over a single table.
This is probably pretty easy to do, but I'm a newbie.
Please consider the following table, which may look a bit squashed.
SEQ PARTID S HOTTIME
--- --------- - ---------
245 222 I .00037037
246 222 I .00005787
247 222 I .00003472
248 222 I .00003472
249 222 O
253 220 I .00591435
254 228 I .03850694
255 226 O
257 227 I .00121528
258 227 I .0000463
259 227 I .00240741
262 227 O
GOAL:
Disregard all rows where S = O.
For each PARTID number where S = I, sum the hottime for that PARTID.
List the sums thus, one row per unique PARTID:
PARTID SUM
------ ----
220 sum
222 sum
227 sum
228 sum
|
|
|
|
|