Skip to main content
The following is a short list of examples on how to create complex queries of your data. This is not intended to be an all-encompassing list so be sure you familiarize yourself with all of the possible query parameters documented in the Data API documentation. Note: All of these examples leverage ES6 arrow notation, template strings, and the domo.js library.

Select All


GroupBy


Selecting all the data typically isn’t practical, especially as you start working with large datasets. Keeping with best practices, you should aim to only get the data you need. Let’s change our query so we summarize sales by sales rep

Filters


Rolling Date

Performance for all time might just give long-time employees the advantage. How about total sales for the last 3 months?

Contains

What if I only want reps with a specific name?

Equal & Dategrain

How about getting monthly sales for a specific sales rep?

OrderBy


Who had the top 10 biggest sales for the last month?

OrderBy an Aggregation


How about getting the Top 10 Reps by the totals sales in the current quarter?

Distinct


Simple

While there’s not a DISTINCT option like you’d find in SQL, you can accomplish the same result leveraging groupby

Multi-Dimension List

Add you can make it more complex by just adding additional fields to both the fields and groupby parameters.