Well, that really depends on how the tables are structured, but I'll make some assumptions and take a shot :)
Here's what I would do:
SELECT t2.stockCode, COUNT(*) as qtySold
FROM table2 t2
WHERE (t2.custNumber = 'blabla') AND
(t2.transDate >= 'startdate') AND
(t2.transDate <=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.