Re: [SQL] aggregate / group by question

2005-02-24 Thread T E Schmitz
Hello Keith, Thank you for your help. Keith Worthington wrote: T E Schmitz wrote: Tables: TRANSAKTION --- KIND ('R' or 'S' for refund or sale) TRANSAKTION_PK PAYMENT_METHOD (cheque, cash, CC) ITEM TRANSAKTION_FK ITEM_PK RETAIL_PRICE DISCOUNT Desired result set: PAYMENT_METHOD | categor

Re: [SQL] aggregate / group by question

2005-02-23 Thread Keith Worthington
T E Schmitz wrote: Hello, I must apologize for not coming up with a more descriptive subject line. I am struggling with the following query and I am not even sure whether what I want to achieve is possible at all: The problem in real-world terms: The DB stores TRANSAKTIONS - which are either sal

[SQL] aggregate / group by question

2005-02-22 Thread T E Schmitz
Hello, I must apologize for not coming up with a more descriptive subject line. I am struggling with the following query and I am not even sure whether what I want to achieve is possible at all: The problem in real-world terms: The DB stores TRANSAKTIONS - which are either sales or refunds: each