I have a query doing this:
Select product, count(*), sum(amount), sum(Portion)
From Event_Table et,
Money_Table mt
Where et.ID = mt.ID
and mt.Num in (1,500,510)
Group by product
My count gets inflated because an event can have more than one mt.Num associated with it, based on whether it's an amount or a portion. Is there a way to keep the count to the number of events, regardless of how many joins there are to the money table?
Select product, count(*), sum(amount), sum(Portion)
From Event_Table et,
Money_Table mt
Where et.ID = mt.ID
and mt.Num in (1,500,510)
Group by product
My count gets inflated because an event can have more than one mt.Num associated with it, based on whether it's an amount or a portion. Is there a way to keep the count to the number of events, regardless of how many joins there are to the money table?