Skip to content
Advertisement

First row of results should never be displayed

DB-Fiddle

Expected Result


In the results I want to display the quantity for all dates except for the first row.
I know in the example above I can do this with a simple WHERE-condition like this:

However, it is neither guaranteed
that the first time_stamp will be always 2020-01-14
nor that the MIN(2020-01-14) is always in the first row.

Therefore, I am wondering how I have to modify the query to always not-display the first row of the results?

Advertisement

Answer

Since this is Postgresql, you can use the OFFSET clause.

https://www.postgresql.org/docs/current/queries-limit.html

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