The line I marked in red is my suspected line. The query runs, but I am getting a null value for every customer (or zero, if utilize the ISNULL function), no matter what dates or division I use. The subquery works great on its own when I use a specific customer index. I thought that I had used this kind of approach to retrieving sum values before, but for some reason I cannot figure out why this does not work. Can anyone point out where my error may be in the query?
Thanks!Bill