While basic mode is an excellent choice for creating charts without needing to know how to write queries, working in advanced (NRQL) mode offers more power and additional features.
Any data specified in basic mode can be written as an NRQL query in advanced (NRQL) mode.
Example of an advanced (NRQL) query.
When you switch from basic mode to advanced (NRQL) mode, the query you see produces the exact same chart as the basic data specification.
If your query was started using basic mode and if you make changes to that query using advanced (NRQL) mode, you cannot return to basic mode to edit that query.
Any additional changes may only be made in advanced (NRQL) mode.
Use this table to understand how basic mode specifications correspond to the equivalent NRQL query.
To set this
In basic mode, you enter ...
In advanced (NRQL) mode, you write ...
The event type, attribute, and function on that attribute
View a chart with
Narrowing your results to show only those transactions with a 404 page not found error
Narrow results to
Enable a preliminary timeline view
not needed in basic mode
To see a separate value for each application with a 404 error
To view the five applications with the most 404 errors
To view errors over the last three hours
To enhance the results of sampling transaction data
This feature is run automatically in basic mode
Queries written directly in NRQL can be more complex than queries written in basic mode. The NRQL documentation contains both reference information and query examples. This table identifies some items to keep in mind.
For each statement or function in your query, you can view a list of valid options, with tooltips.
Example of a prompt in advanced (NRQL) mode.
You can use multiple event types in an NRQL query.
You can use multiple attributes per event type in an NRQL query.
View previous queries
Once you run an NRQL query, use the My recent queries dropdown to view up the last 1,000 queries that you ran. The dropdown has a search box to help you find your query.
Working with basic mode and NRQL
If you start creating a chart using basic mode and then switch to advanced (NRQL), be aware that if you make any changes to the NRQL query, you will lose those changes in basic mode.
The query builder’s autocompleter will display events and attributes reported within the last 60 minutes. An example of this is a process that runs once a day, such as a standard system health check that kicks off every morning at 6:00am. If you attempt to query the event at 7:05am, the event and subsequent attributes will not be visible in the autocomplete dropdown.
These events and attributes are still queryable by typing the exact string.
When using the
To use multi query, enter your first query with
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.