You'll only be able to do analytics on current data, or if you want historical data you'd need to start recording it and can only do historical data from that point on, unless you were to take past historical data from offchain and then save it to the smart contract.
All of this is a moot point though, because it would be prohibitively expensive and very unrealistic to do. Not to mention you'd probably run out of block space.