App data query examples using NRQL

You can use NRQL to query the application data collected by New Relic APM, New Relic Browser, and New Relic Mobile. You can then use this data to answer a variety of questions. Here are some basic examples.

Unique users

How many unique user sessions did you have in the last week?

SELECT uniqueCount(session) FROM PageView SINCE 1 week ago

Were your unique user sessions up or down last week compared to the week before?

SELECT uniqueCount(session) FROM PageView SINCE 1 week ago COMPARE WITH 1 week ago

Pageview trends

How can I graph the number of unique users yesterday compared to the day before?

SELECT count(*) FROM PageView SINCE 1 day ago COMPARE WITH 1 day ago TIMESERIES AUTO

OS version

How many of your mobile users are on the latest OS version?

SELECT uniqueCount(uuid) FROM MobileSession FACET osVersion SINCE 7 days ago

Key account Apdex

What is the Apdex score for a particularly important customer? If you have defined some custom attributes, you can query Insights to monitor how this customer experiences your app from a performance standpoint:

SELECT apdex(duration, t: 0.4) FROM Transaction WHERE customerName='MrBigshot' SINCE 1 day ago

For more help

Recommendations for learning more: