I have the following sql query listed below. I show the out put be low
that. I am trying to get this query to toatl and only show the line of
information with the total on it. Do you have any ideas?
SELECT ReserveWithPrice.reservationid, ReserveWithPrice.Site,
ReserveWithPrice.SitePrice, MyQuery.Total
FROM ReserveWithPrice INNER JOIN [SELECT Reservationid,
Sum(ReserveWithPrice.SitePrice) As Total
FROM ReserveWithPrice GROUP BY ReserveWithPrice.Reservationid]. AS
MyQuery ON ReserveWithPrice.Reservationid = MyQuery.id
ORDER BY ReserveWithPrice.Reservationid;
Table results
reservationid Site SitePrice Total
101 RV3 $25.00 $25.00
101 RV3 $25.00 $50.00
101 RV3 $25.00 $50.00
101 RV2 $25.00 $25.00
101 RV2 $25.00 $50.00
101 RV2 $25.00 $50.00
I would like to see the following:
reservationid Site SitePrice Total
101 RV3 $25.00 $50.00
101 RV2 $25.00 $50.00
Also the query prompts me for the MyQuery.ID Can't figure out why it's
doing thta either.
If anyone has any ideas please let me know.
Thanks
Dan