description (optional) is intended for display in the Class Reference. The description is blank by default. See Creating Class Documentation.
name (required) is the name of the query. This must be a valid class member name, and must not conflict with any other class member names.
formal_spec (optional) specifies the list of arguments that are passed to the query.
Specifically, this is the list of arguments that are passed to the query via the Execute() method of the associated query class.
See the comments for formal_spec in Syntax of Methods in Class Definitions.
classname (required) specifies the query class used by this query.
This is typically %SQLQueryOpens in a new tab for SQL-based queries and %QueryOpens in a new tab for custom queries. See Class Queries.
Custom class queries are not supported for sharded classes.
keyword_list (optional) is a comma-separated list of keywords that further define the query.
See Query Syntax and Keywords for a complete keyword list.
If this list is omitted, also omit the square brackets.
implementation (optional) is zero or more lines of code that define the query.