← Communications
Lesson 03 of 06Beginner 15–20 minutes

Queries

Learning objective

Explain what a query does, identify the purpose of a base, distinguish between filters and exports, build a simple query, and use a query to answer a real-world Slate question.

Core takeaway

Queries help you find the records you need by starting with the right type of record, narrowing the results with filters, and choosing what information to return.

Understand

Queries: Ask Questions of Your Data

Slate stores a tremendous amount of information. Once that information exists, you need a way to find the records that matter for the question you're trying to answer.

That's what queries do. A query allows you to start with a group of records, narrow that group using criteria, and return the information you need.

For beginners, it helps to think of every query as answering a question: Which students submitted an application this term? Who registered for an upcoming event? Which records have an email address? How many students selected Nursing as an academic interest?

The big idea

Base → Filters → Exports → Results

Base

Who or what are you starting with?

Filters

Which of those records should remain?

Exports

What information do you want to see?

Results

The records and information returned by the query

Base

Filters

Exports

Results

Every query starts with context. Before adding filters or exports, you need to understand what kind of records you're working with. That's why the Base matters.

Remember these

Query

A tool used to find records that meet defined criteria and return selected information.

Base

Defines the type of records the query begins with.

Filter

A condition used to narrow which records are included.

Export

A piece of information returned in the query results.

Results

The records and information returned after the query runs.

Filters vs. Exports

Filters ask

Who should be included?

  • State = Tennessee
  • Email is not blank
  • Academic Interest = Nursing
Exports ask

What do I want to see about them?

  • First Name
  • Last Name
  • Email Address
  • Academic Interest

Filters decide WHO. Exports decide WHAT YOU SEE.

Check your understanding

One question at a time. Wrong answers are just practice.

Question 1 of 4

You want a list of people whose State is Tennessee. What role does “State = Tennessee” play in the query?

Practice

Build Your First Query

Goal

Build a simple query and identify its Base, Filters, Exports, and Results.

Open your institution's Slate database in another tab. Create a new query using a Base that allows you to work with Person records. Because Slate configurations and permissions vary, the exact Base name available to you may differ. Build a simple query that identifies people whose Last Name = Smith AND Email Address is not blank, then return First Name, Last Name, and Email Address.

  • Create a new query
  • Select an appropriate Base
  • Add a Last Name = Smith filter
  • Add an Email is not blank filter
  • Add First Name as an export
  • Add Last Name as an export
  • Add Email Address as an export
  • Run or preview the query results

Depending on your institution's permissions and data, your exact filter and export names may vary. The goal is to practice the structure of the query, not reproduce an identical configuration.

Base

People

Filters

Last Name = Smith; Email Address is not blank

Exports

First Name; Last Name; Email Address

Your Slate may look different

Slate is highly customizable. Your institution's tabs, fields, views, permissions, and processes may differ from examples used throughout Insider's Aid. Focus on understanding the concept rather than finding an identical screen.

Reflection

You built a query with the filter State = Tennessee and the export Email Address. What does the query do?

Apply

Your Director Needs a List

Your director asks: “Can you give me a list of prospective students who have Nursing as their academic interest and include their name and email address?” Before opening the query tool, what should you identify?

What should you identify first?

Build the Query in Your Head

Your institution wants a list of people where State = Tennessee, Academic Interest = Nursing, and Email Address is not blank. The final list should display First Name, Last Name, Email Address, and Academic Interest.

Which grouping classifies these correctly?

When Do You Need a Query?

Which situation most naturally calls for a query?

Pick the situation that calls for a query.

Think Like a Slate User

Step 1

Business question

Start with the real-world ask

Step 2

Who or what?

Choose the Base

Step 3

Who matches?

Add Filters

Step 4

What do I need to see?

Add Exports

Step 5

Results

The records and information returned

Don't start with the query builder. Start with the question.

A strong Slate user learns to translate a real-world question into data before building anything. When someone asks for a list, report, audience, or group of records, pause and identify: What type of records am I working with? What criteria define the group? What information needs to be returned?

Insider's Aid Tip

Write the question in plain language before building the query. If you can't clearly explain who you're trying to find and what you need to know about them, you're probably not ready to build.

Put it together

Put It Together

Your Slate mental model is now: Record → Field → Value → Form → Query.

Record

Who or what does the information belong to?

Field

What type of information is stored?

Value

What information is actually stored?

Form

How might we collect information we don't have?

Query

How do we find records based on information Slate already has?

For example: a Person record holds the field Academic Interest, whose value is Nursing — collected by a form asking “What program are you interested in?” — and found later by a query: “Find everyone whose Academic Interest = Nursing.”

This is how Slate concepts begin to connect. Forms can help collect information. Fields give that information a place to live. Queries help you find the records whose data matches the question you're trying to answer.

Reference

Keep Learning

Records

Review what type of record you're working with.

Fields

Review where the information you're filtering and exporting lives.

Forms

Review how information can be collected.

Datasets

Learn how structured collections of records and information can be organized.

Finished the lesson?

Mark it complete to track your progress. Progress is saved in this browser.

Slate Foundations progress0 of 7 lessons complete
Up next

Deliver

Understand how Slate Deliver supports sending communications to the right audience.

Available