Basics
SQL Reports allow you to write raw SQL against a database that you have set up in Admin > Import Connections. To create a SQL report, click the "New Report" button.
If you have the correct permissions, choose SQL for the report type.
And write SQL against the database.
SQL reports appear the same as other reports, except they can’t have advanced formatting.
Example SQL
You can include the following text in your SQL queries.
- [calendar-period-id]
- [calendar-period-start]
- [calendar-period-end]
- [organization-id]
In this example we’re referencing both the calendar period start date and end date to see all of the failed logins during the current period.
Here are the report results for August 2019. You can see there were three failed logins.
When you change the calendar period selector to September 2019, the SQL report shows different results.