A query, in computing, is a request for data or information from a database, search engine or other system. In relational databases, queries are usually written in SQL (Structured Query Language) and can select, filter, join and summarise records; a bank might query its ledger for all transactions on an account in a month. Well-designed indexes allow queries to run quickly over very large tables, and query performance is a major concern for core banking systems and trading platforms.
Blockchains are awkward to query directly, because a node stores data block by block rather than in searchable tables. Applications therefore rely on indexing services that read the chain and load it into a database, such as The Graph with its subgraphs, on block explorers such as Etherscan, and on analytics platforms that expose chain data through SQL.
Ref 1300000337