hi all, i am new to SQL and trying to pick up the pieces urgently
any urgent help will be appreciated
Where MEMBERS.ID links to SALES.MemberID write SQL queries to achieve an output dexcribed by the following
2xtables
MEMBERS
ID int, not null
FirstName text
LastName text
EmailAddress text
SALES
ID int, not null
MemberID int
PurchaseDate datetime
Description text
Quantity int
Amount money
and the question
6) Return a sum of sales by month which can be matched to a member sale.
thus far i have the query though its not what i am after
SELECT SALES.MemberID, MEMBERS.FirstName, MEMBERS.LastName, Sum(SALES.Amount) AS SumOfAmount
FROM MEMBERS INNER JOIN SALES ON MEMBERS.ID = SALES.MemberID
GROUP BY SALES.MemberID, MEMBERS.FirstName, MEMBERS.LastName;
which gives the total for each MemberID
but i am assuming based on the question i am asked to separate these figures into related month columns