Drop the first and last rows/values from the table

Is there an easy way to drop the first and last values/rows?

I was thinking something along the lines of this:

|> filter(fn: (r) => r != first() and r != last())