A query is a request of information from a database.
Example: The database query retrieved the records of all employees who work more than 40 hours per week.
About The Word “Query”
Queries are most often used in SQL (structured query language), developed by IBM in 1974. This language allows a user controlled set of data to be returned from a very large collection of information.
An example SQL query
WordPress also utilizes SQL in its own unique way, with a class called wpdb, which contains its own function to relate WordPress to a database. Using the object $wpdb, a sample query for use in WordPress would look like this: