Sum fields in one table and count rows in another

Thanks for the feedback Kristen, I'm back into SQL after 15 years of not touching it, so I'm very much out of practice and have no doubt forgotten a hell of a lot. This is a one off report which executes in about 4 seconds, so not too fussed about the inefficiency of the NOT LIKE '%Test%' clause, there are only 150 records to scan and only 2 events match the criteria which I want filtered out, but definitely take on board the date clause, thanks for that, that was a case of "How I used to do it in SQL Server 2000".

1 Like