SELECT CK_SERVER as Server#,
CK_MEAL,
COUNT(CK_CHECKNO)as Checks,
SUM(CK_FOOD+CK_BEVG+CK_BEER+CK_WINE+CK_LIQUOR+CK_OTHER) AS ItemsSold,
SUM(CK_TAX) AS Tax,
SUM(CK_TIP) AS Tips,
SUM(CK_DISCOUNT) AS Discounts,
SUM(CK_COVERS) AS Covers,
SUM(CK_FOOD+CK_BEVG+CK_BEER+CK_WINE+CK_LIQUOR+CK_OTHER + CK_TAX + CK_TIP - CK_DISCOUNT) AS Total
FROM V1REST.dbo.RSTCHIST
where CK_DATE >= '05/01/2009' and CK_DATE <= '05/18/2009' and RESTNO = '1' and CK_STATUS = 'c'
GROUP BY CK_MEAL,CK_Server
Order by CK_Server
|