Data & Analytics

What is Query?

Quick answer

A request for data or information from a database, search engine, or other system, usually written in a specific language or format.

Query, explained

In databases, a query asks for specific records or calculations. For example, the SQL statement SELECT title FROM posts WHERE category = 'fintech' ORDER BY published_at DESC retrieves the titles of FinTech posts, newest first. Queries can also insert, update, or delete data, join tables together, and compute totals or averages.

In search engines, a query is the text someone types, and the engine interprets intent to return relevant results. In APIs like GraphQL, clients send structured queries describing the data they need. Query performance matters at scale: well-designed indexes, efficient joins, and caching can turn a slow query into a fast one. Poorly handled user input in queries can lead to SQL injection vulnerabilities.

Related terms

Guides that mention Query