Standard SQL Queries
Getting started with SQL queries in Resmo
SQL is a well-known and powerful language. Resmo users can query their resources and changes using standard SQL statements with auto-complete support.

All SQL queries are standard Select statements.
Simple SQL query
List all Jira users
SELECT * FROM jira_user

List all active Jira users
SELECT accountId, displayName, emailAddress FROM jira_user WHERE active = true AND accountType = 'atlassian'

Jira users per group
SELECT g, COUNT(*) FROM jira_user u, u.groups g GROUP BY gSimple SQL query with where statement
SQL query with IN statement to run cross resource queries
NewRelic users that don’t exist on Google Workspace
SELECT name, email FROM newrelic_user WHERE email NOT IN (SELECT VALUE primaryEmail FROM gsuite_user)
SQL query with nested objects
Most configuration data is nested and it's easy to refer to inner objects with the dot notation.
SELECT metadata.namespace, metadata.name FROM kubernetes_replicaset r, r.spec.template.spec.containers container

Functions help simplify queries that are hard to write.
The following function with aws_sg_allows function shortens the SQL query a lot.
SELECT accountId, region, vpcId, name, description FROM aws_vpc_security_group WHERE aws_sg_allows(ingress, '0.0.0.0', 25, 3389)
The following functions are available at the moment:
  • TBA

All standard keywords supported in Select SQL queries are available to use.
Some common keywords are:
  • DISTINCT
  • SUM
  • COUNT
  • COALESCE

Keyword list
Copy link
On this page
Query examples
Functions
Supported SQL keywords
Reserved Keywords