All, trying to create this subquery but I get an error: the select statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect. This is my code:
Code:
SELECT tblCust.Custid, tblgross.[grossreceipts], Max(SumOfgrossreceipts) AS [MaxOfSumOfgross receipts]
(SELECT tblCust.Custid, tblgross.grossreceipts, tblCust.Custid, Sum(tblgross.grossreceipts)AS [SumOfgrossreceipts]
FROM tblgross LEFT JOIN tblCust ON tblgross.custid = tblCust.custid
GROUP BY tblCust.Custid, tblgross.grossreceipts, tblCust.costid)
FROM tblCust LEFT JOIN tblgross ON tblgross.custid= tblCust.custid;
Can someone help please? Thanks