Query builder: Basic mode

Use the New Relic One query builder in basic mode to create a chart without having to use NRQL, our querying language. The basic mode helps guides you through a query-creation process. You can choose the source of the raw data, apply filters, and use other techniques to narrow the scope of the data in the chart.

Data type

The query builder basic mode has a Data type selector with two options:

Example of using basic mode

This example shows how to create a chart in basic mode.

Step 1: Select the source of the data for a chart

Begin by specifying what data you want to view in your chart. Click in the View a chart with box to select the event type, an attribute, and a function to perform on the attribute.

You can use the event data dictionary to view information about an event type and its attributes on a single page. To see a tooltip with information about an event or attribute, hover over any term that has a dotted line underneath it.

Here are the results of using the event data dictionary to specify the data:

  • Event type. The Transaction event type measures a variety of data that describes what happens while a user is on a website, such as that user clicking on a button on a page.
  • Attribute. The name attribute stores information on all transactions.
  • Function. Select the unique_count function to get a count of all the transactions that occurred during the time frame.

Basic mode now shows the selection:

one.newrelic.com > Query builder > Basic > (event and attribute specified)

As you specify data, the chart updates to show you the results from the data you specified.

Based on the information specified so far, you can see a chart that shows the total number of transactions during the default time frame of 30 minutes. This total includes all transactions, whether the transaction was completed successfully or had errors.

one.newrelic.com > Query builder > Basic > (event and attribute specified)
Step 2: Filter the data

Your next step is to determine which of those transactions got a 404 page not found error. If you look in the event data dictionary for the Transaction event type, you'll find this event also includes an attribute called httpResponseCode.

  • Narrow the results to show only those transactions where a page not found error occurred. Use the Narrow results to box to create this filter: httpResponseCode = 404 .
  • Because you want to be able to see the names of the apps that are resulting in the 404 errors, you use the Facet by box to see the results by appName (which is also an attribute for the Transaction event type). Faceting by appName updates the chart to break down the total number of 404 errors by the application names. This lets you know which apps are experiencing 404 errors.

Your chart now shows the line chart with a line for each app, each with its own color.

one.newrelic.com > Query builder > Basic > (event and attribute specified) > (filters and facets applied)
Step 3: Adjust time range and limits

You decide to focus on the five apps with the most page not found errors. The default value for the Limit field is 10, meaning that your chart will show the ten most relevant returns. You change that value to 5.

Customer support told you that they had been getting calls about these errors for a little over two hours. You decide to change the time range from the last 30 minutes to the last three hours so that you can view the errors during the time when the customers were calling support.

Now that you have the data set so that you are seeing exactly what you need, you can turn your attention to the appearance of the chart.

Step 4: Customize the chart

Because you are more interested in the total number of errors than a timeline view, you change the chart type to a bar chart.

one.newrelic.com > Query builder > Basic > (event and attribute specified) > (filters and facets applied) > (time range and limit customized) > (chart type customized)

When you're finished with your chart, you can add it to a dashboard or share it.

This table contains notes about using basic mode.

Item Description
Prompts You can start typing directly in an empty box; a list of items that match the information you type will display.
You can also click on an empty box to view a list of all of the items that are appropriate for the field, based on your earlier choices.
Saving a basic mode data specification Every time you run a query, that query is saved in the My recent queries dropdown in advanced (NRQL) mode.

Basic mode only supports data for one event and attribute.

If you want to use more than one event and/or attribute, use the SELECT statement in advanced (NRQL) mode.


Basic mode contains shortcuts that can display more complex events and attributes that aren't generally supported, as in this example (which shows the tooltip for the shortcut).

Example of the Response time histogram shortcut, showing a tooltip.
Tooltips Any time you see a dotted line under a term, you can hover over that term to see a tooltip with an explanation of the term.
Narrow by

You can use more than one Narrow by definition in basic mode filter; the conditions will be joined by AND.

The WHERE clause in advanced (NRQL) allows OR in addition to AND.

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.

For more help

If you need more help, check out these support and learning resources: