/kwɪəri/

noun — "request for data or information."

Query is a formal request to a computing system, database, or service for specific information or data retrieval. In database systems, a query is a statement or expression used to specify criteria for selecting, filtering, updating, or manipulating data stored within tables, documents, or other structured formats. The term is used broadly in programming, networking, and information retrieval, encompassing operations from simple lookups to complex analytics and joins across multiple datasets.

Technically, a query in relational database management systems (RDBMS) is typically expressed in a query language such as SQL (Structured Query Language). It can include SELECT statements for retrieving data, INSERT or UPDATE statements for modifying data, and DELETE statements for removal. Queries may use predicates, filters, aggregations, sorting, grouping, and joins to refine and structure results. Non-relational databases, such as document stores, key-value stores, or graph databases, provide their own query mechanisms tailored to the underlying data model.

In workflow terms, a developer might issue a query to retrieve all customer orders exceeding a certain value within a date range. The query is sent to the database engine, which parses, optimizes, and executes it efficiently. Indexes, caching, and query planning improve performance, allowing results to be returned quickly, even with millions of records. Similarly, in a search engine context, a user’s keyword input constitutes a query that triggers retrieval algorithms, ranking, and filtering to return relevant documents or results.

Advanced query systems support parameterized queries, stored procedures, or prepared statements to improve security, avoid injection attacks, and reuse execution plans. In distributed or large-scale data environments, queries may be parallelized, executed across multiple nodes, or combined with streaming operations for real-time analytics. Query optimization involves choosing the most efficient execution strategy, using cost-based planning, indexing strategies, and knowledge of data distribution.

Conceptually, a query acts like a precise question directed at a structured repository: it defines what information is desired, how it should be filtered, and what form the answer should take. It bridges the human or programmatic intent with the structured representation of data, enabling accurate, repeatable, and efficient information retrieval.

See Database, SQL, Index.