@ekaitz_zarraga I was trying to use stuff like this:
SELECT DISTINCT EXTRACT(YEAR FROM date) AS Year, (SELECT COUNT(id) FROM Documents WHERE EXTRACT(YEAR FROM date)=Year) FROM Documents WHERE EXTRACT(YEAR FROM date)=Year;
It may be terrible, I am learning just how little I know about sql queries.
I gave up and started just using it as a data store to pull things from for processing in python, I have had much more success with that.