Creating a table from machine data

I’m attempting to create a table (txt that is really a csv attached with sample data). All I’m trying to do is select the unique ec2Tag_sqlinstance (so USE01 and USE03 in the data) and have the machine name be next to it. So, the sample data should generate a 2-row table. I cannot for the life of me get this query to just two rows

SELECT entityName,ec2Tag_sqlinstance from SystemSample where ec2Tag_Role =‘BRYTEFLOW’ and ec2Tag_Environment = ‘prod’

Any ideas?

smallExtract.txt (276 Bytes)


Try to use the unique() function to your query as documented here Introduction to NRQL, New Relic's query language | New Relic Documentation