Re: Query with multiple tables
patrick.sparks_at_gmail.com
Date: 10/20/04
- Next message: Trifon Triantafillidis: "msdb database marked suspect"
- Previous message: patrick.sparks_at_gmail.com: "Re: Query with multiple tables"
- In reply to: Don: "Re: Query with multiple tables"
- Messages sorted by: [ date ] [ thread ]
Date: 19 Oct 2004 19:05:20 -0700
Try this:
SELECT
t1.Item
, t1.description
, t2.location
, t2.qty_on_hand
, sum(t3.sales)
from t1
inner join t2 on t1.item = t2.item
inner join t3 on t2.item = t3.item and t2.location = t3.location
group by
t1.Item
, t1.description
, t2.location
, t2.qty_on_hand
- Next message: Trifon Triantafillidis: "msdb database marked suspect"
- Previous message: patrick.sparks_at_gmail.com: "Re: Query with multiple tables"
- In reply to: Don: "Re: Query with multiple tables"
- Messages sorted by: [ date ] [ thread ]
Loading