Skip to content
Advertisement

Get First Record of Each Group

First I would like to apologize if it is a basic question.

So, i have monitoring data being stored every 5 seconds. I want create a query that returns me the first record every 10 minutes, for example:

The desired result is:

I’m using SQLServer database.

I read about similar solutions as post: Select first row in each GROUP BY group?

But i can’t resolve my issue.

I started with:

But i can’t use FIRST() or top 1 in this query.

Anyone have ideas?

Thanks a lot!

Advertisement

Answer

If I understand correctly:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement