The Query Builder is used to isolate records that meet specific criteria. Some of the queries created in Slate will be used continually as part of business processes, while others may be used just once to accomplish a non-recurring task. Choose New Query when the query should be saved for future use, or choose Quick Query for ad hoc queries.
- Click Queries / Reports in the top navigation bar.
- Click Quick Query.
- Pick a Type and a Base for the query. Bases are grouped by Type, which includes local query bases created or modified for your instance, Slate Template Library bases that are the same across all Slate instances, and Configurable Joins bases that include more advanced capabilities.
The query base determines what each row of the query results will represent: for example, a query on the Applications base will return one row per application, while a query on the Prospects base will return one row per person record.
While the base selected will begin to define the query results, filters must be applied to more precisely limit the records that will appear in the query results.
The query base cannot be changed once the query build is started.
|Quick Query Options|
|Run Query||Once exports and filters are added, click Run Query to display query results|
|Preview Results||See a sample of query results prior to running the query.|
|Display SQL||View the SQL generated from adding exports and filters|
|Save Copy||Save a quick query for future use.|
|Export||Click Export to begin defining the data (i.e. the columns) that will appear when the query runs.|
|Literal||Click Literal to add a static value as an export column. Every row in the query results will have the same static value in this column.|
|Formula||Click Formula to produce calculated values based on a defined formula.|
|Custom SQL||Click Custom SQL to add a custom export column. This option is used for more complex data exports. In many cases, Configurable Joins removes the need for custom SQL exports.|
|Existence||Select Existence to return a value based on whether or not the record meets certain criteria. On Configurable Joins query bases, Existence exports are created using subqueries.|
|Subquery||Configurable Joins query bases include the option to add subquery exports.|
|Filter||Click Filter to restrict the population of records to be exported. Add as many filters as needed.|
|Custom SQL||Click the Custom SQL button to add a custom SQL filter. This option is used for more complex data exports. In many cases, Configurable Joins removes the need for custom SQL filters.|
|OR, NOT, ), (||When necessary, add OR and NOT logic operators. Parentheses must be used with logic operators.|
|Subquery||Configurable Joins query bases include the option to add subquery filters.|
|Sort||Sort query results based on one or more data points. If a sort key is not added, queries using a Prospects or Applications base are sorted by last name, first name.|