Published Updated
A query is a question or a request for information. If you write to a shop to ask when your chair will arrive, you’ve sent a query. To query something can also mean to ask whether it’s right. You might query a delivery charge if the shop promised free shipping.
Say it: KWEER-ee or KWAIR-ee, with the stress on the first syllable. Noun: one query, two queries. Verb: I query, she queries, we queried, they’re querying.
Imagine you see two entries on a receipt. One says “Delivery, $8.” The other says “Assembly, $15.”
| What you want to know | What you could write |
|---|---|
| You haven’t heard what the assembly service includes. | “I have a query about assembly. Will someone put the chair together in my home?” You’re asking for information. |
| The shop promised free delivery. | “I’d like to query the delivery charge. My order confirmation says shipping is free.” You think something may need correcting. |
Both uses are ordinary ways to pose a question. The second does more than ask what a charge means. It tells the shop why you’re questioning it. It still leaves room for an explanation. In conversation with a friend, “Can I ask you something?” is an easy alternative to “I have a query.”
A search query is what you put into a search box. If you type library open Sunday, those three words are the query. The list of libraries you see afterward is the result. You don’t need to type a whole question or include a question mark.
A database query asks a computer to work with information it has stored. Suppose a library keeps this list:
| Book | Available today? |
|---|---|
| Night Train | Yes |
| The Green Boat | No |
| Garden Birds | Yes |
Ask for the titles available today and the result contains Night Train and Garden Birds. The query is the instruction you gave the list. The two titles are its answer. In SQL, a language for working with databases, a SELECT query retrieves records. In Microsoft Access, an action query can change the stored records.
Three related terms come up when you work with queries. A query builder lets you choose fields and conditions, such as Available = Yes, through controls on a screen. Query optimization means finding an efficient way to get the requested result. A query string is part of a web address. In an address ending in ?day=sunday, the part after the question mark carries a value the site can use.
A writer sends a query letter to interest a literary agent or editor in a book or article. It’s an introduction to the work. An agency may ask for a separate summary or sample pages. For example, the Liverpool Literary Agency’s guide shows what goes in the letter and where to describe the story. The recipient’s own instructions tell you what to send.
If you want to say what happened next, use answer or reply: “My query was about the date. The reply said Friday.” For another way to ask for details, see how to use inquire about.
The word goes back to Latin quaere, an instruction meaning “ask.” Merriam-Webster records the verb in 1614 and the noun in 1620. People could query an uncertain fact centuries before anyone queried a computer.
Choose an answer to see why it fits or what clue to look for. You can change your answer.
Nina types “last bus home” into a travel app. It shows her a bus leaving at 10:40. Which part was her query?
An editor writes, “I’ve queried the date on this photograph. The trees look bare for July.” What does the writer now know?
Sam wants to see which library books are available so he can choose one. The library tool can show titles or change their records.
