Let’s say you have a SQL query that is returning n results and you want to return only results from 1 to n-1 without first row (0).
Current query is available at https://data.stackexchange.com/stackoverflow/query/edit/73895
I want to ignore the first row because it contains an incomplete month.
Update: I simplified the quest, I for removing the last record it is easier by using a WHERE clause based on current date.
You changed the question.
For the original question (exclude first and last row), this is going to incur two sorts: