A query is any question or request expressed for information in a formal way. Here, in terms of programming language, a query is almost the same; the only difference is the answer or asked information comes from a database.