NRQL - How to get the following results using the NRQL

I am trying to get the list of open incidents which are opened for more than a week and I need to summarise it in an Ascending & Descending order using NRQL. Can you please help me to get the query?

I have to use it for Infrastructure, Synthetics & APM as well.

Hi there @nocgroup -

I took a look at this for you and I don’t think there is a straighforward way to do this, per this thread:

Let me know if you have more questions after reviewing that thread, or if I misunderstood what you are trying to do!

Hi, @nocgroup: You may find this post helpful: