A EOS C++ smart contract can have code that query and iterate through the blockchain, to get the actions and transactions and related data?
In eos.js you can do eos.getActions(accountName)
but inside smart contract in c++ i don't know if it is possible.