I am doing an assignment and I am close to completing it. However the package balance appears on multiple lines and I would like to combine the balances for each package type.
IF OBJECT_ID('vwPackageRevenue') IS NOT NULL
DROP VIEW vwPackageRevenue
CREATE VIEW vwPackageRevenue
SELECT (dbo.packageWH.PNAME) AS 'Package Name'
,(COSTPERSON * COUNT(GFirstName)) AS 'Total Revenue'
JOIN dbo.reservationWH ON dbo.packageWH.P_ID = dbo.reservationWH.P_ID
JOIN guestWH ON dbo.reservationWH.RNUM = dbo.guestWH.RNUM
GROUP BY dbo.packageWH.COSTPERSON
Any ideas how to complete this?