# Queries
Available from package Optimise
The query module allows you to query data and display it straight away. The query can be saved for later use in a dashboard.
# Objects
The following objects can be queried:
- Measurements
- Events
- Logs
# Measurements
# Operations
# Count
Count allows you to query the number of registered values instead of the value itself.
If you choose not to group, you can enable the option to ignore the time selection and therefore display the total count.
# Creating a query
Go to Data > Queries and click Add. The query builder has these parts:
- What: the source, such as measurements, events or logs.
- Fields: the fields you want to see. Per field you optionally choose an operation: count, average, sum, last, first, highest, lowest, increase, cumulative sum or the difference between highest and lowest.
- Fixed filters: filters that always apply. You combine them with and or or.
- Dynamic filters: filters filled in by the dashboard or the user, such as project, asset, asset type, owner, task, job type, measurement, company or service. You give each a label.
- Group: for example per time interval or per asset.
With Run query you see the result in the Data panel. Save the query with Save and give it a name.
# Using queries
- In a dashboard: when adding a tile you choose a query or create a new one straight away, see Dashboards.
- As an export: from the list of queries you export to CSV or create a recurring export, see Importing and exporting.
- With Duplicate you make a copy to adjust.
# Raw query
A raw query is a query in SQL, for calculations the query builder does not support, such as the dew point or a value with a correction per asset. Raw queries are set up by Eye on Data. They can be used in dashboards and exports like any other query.
← Measurements Storage →