Fix issue with SQLite 3.7.13 and aggregate in subquery
I tried to correlate something that should not have been