Query Definitions Query Definitions A class query defines an SQL query that can be used by the class and specifies a class to use as a container for the query. Often (but not necessarily), you define class queries in a persistent class, to perform queries on the stored data for that class. You can, however, define class queries in any class.See Query Syntax and Keywords in this reference. See also: Defining and Using Class Queries Adding Queries to a Class in Using Studio