I am interested in analyzing Ethereum transactions and/or the state of accounts (storage) with analytical methods (descriptive statistics, risk/fraud scoring, cluster analysis, forecasting, ...), basic data analytics stuff.
I have understood, that I can export the blockchain level-db storage to an analytical database (SAS, Hadoop, ...) and process it than with SQL or even analytical languages like R, SPSS, SAS.
But my question is: Can I do it in a de-centralized way? Can I write a smart contract for doing that? Do smart contracts have that capabilities and access the blockchain state? Does it cost me gas as these are read-only transactions?
And going further: Can I spread a query over all nodes in the Ethereum network (Massive paralell processing of queries)? I understand that every transaction is processed by every node, but can i split the analytical work to be done to a kind of federated query?
This capabilities would be basically a way of de-centralized data analytics and I wonder if and how this can be done in Ethereum?