Hey there! Newbie here on the hunt to find a solution to an interesting problem!

I've created a database with entries that include dates, a location, and a number. I want to create a query that shows the sum of the numbers entered for each site for the previous 180 days combined with the amount of entries for each site, (e.g. a site has 5 entries with 3,4,5,2,1 as the values, the query output for that day would be 5+3+4+5+2+1=20). I then want it to generate that number for the last year for every day. So the query would have 365 entries in it for each site at all times. Is there a way to do this?
Thanks in advance!!