Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Is it possible to keep a record and only one of all the repeats that there may be of a field?

nrql

#1

Hello
My problem is the following

if I have the following:

name | ate
pepe | Apple
jose | pear
pepe | pear
mark | bana
pepe | watermelon
marck | watermelon

I want a query that left me

name | ate
pepe | Apple
jose | pear
mark | bana

I mean that I left the whole row but only the last of each one, fixing ourselves in the name

or if I look at the fruit
pepe | Apple
jose | pear
mark | bana
pepe | watermelon


Stay with one of each
#2

Try using Latest() in your NRQL. Hard to tell from your post but you might also want to look at using a “where in (”")" clause.


#3

Hello
My problem is the following

if I have the following:

name | ate
pepe | Apple
jose | pear
pepe | pear
mark | bana
pepe | watermelon
marck | watermelon

I want a query that left me

name | ate
pepe | Apple
jose | pear
mark | bana

I mean that I left the whole row but only the last of each one, fixing ourselves in the name

or if I look at the fruit
pepe | Apple
jose | pear
mark | bana
pepe | watermelon


#4

Hey @efornaro - I’m not exactly sure what your goal is here, do you have any example NRQL queries you have tried so far that we can help with ?


#5

@efornaro I see you posted this question twice so I have just merged your other post in here :slight_smile: