Skip to content

Commit

Permalink
Merge pull request #19057 from newrelic/rhs-fix-consumption-query
Browse files Browse the repository at this point in the history
fix (NRQL): Adjust consumption queries to include SINCE clause
  • Loading branch information
nbaenam authored Oct 24, 2024
2 parents ae9c38a + 5c60567 commit 91ba216
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ This query shows the billable full platform users for the month. In other words,

```sql
FROM NrMTDConsumption
SELECT latest(FullPlatformUsersBillable)
SELECT latest(FullPlatformUsersBillable)
SINCE 3 hours ago
```

### Month-to-date core users
Expand All @@ -126,6 +127,7 @@ This query shows the number of core users you'd be billed for if you were billed
```sql
FROM NrMTDConsumption
SELECT latest(CoreUsersBillable)
SINCE 3 hours ago
```
### Estimated cost
Expand All @@ -135,6 +137,7 @@ Here's a query for getting the current month's cost for your full platform users
```sql
FROM NrMTDConsumption
SELECT latest(FullPlatformUsersBillable) * YOUR_PER_FULL_PLATFORM_USER_COST
SINCE 3 hours ago
```
### User queries for organizations without core users [#queries-non-core]
Expand Down Expand Up @@ -205,13 +208,15 @@ These queries apply for some older New Relic organizations that have only two us
```sql
FROM NrMTDConsumption
SELECT latest(FullPlatformUsersBillable) * YOUR_PER_FULL_PLATFORM_USER_COST
SINCE 3 hours ago
```

Here's an equivalent one for your core users:
```sql
FROM NrMTDConsumption
SELECT latest(CoreUsersBillable) * YOUR_PER_CORE_USER_COST
SINCE 3 hours ago
```
</Collapser>
</CollapserGroup>
Expand Down

0 comments on commit 91ba216

Please sign in to comment.