Query
also: queries, queried, querying, sql query
An instruction you send to a database to find, add, change or remove data. For example: "get all orders from last week."
A statement sent to a database, most often in SQL, that reads or changes data. SELECT reads rows; INSERT, UPDATE and DELETE change them. ORMs like Prisma generate queries from code, but a query still runs underneath.
Asking a librarian a specific question: "All cookbooks published after 2020, newest first." The librarian goes and fetches exactly that.
Slow pages and wrong numbers are often query problems. When an agent says a query is slow or returns duplicates, you'll know the issue is how the app asks the database for data, not the screen itself.
The dashboard is slow because this query loads every order and then filters them in JavaScript. I'll filter by date in the query itself.
Show me the exact query the leaderboard page runs, explain it in plain English, and tell me if it could get slow as users grow.
Thinking queries only read data. A query can also insert, update or delete, so "run this query" can mean "change this data".