I have a line vector file and I need to select two lines with the longest length using expression. I am familiar with selecting the line with the longest length:
length($geometry) = maximum(length($geometry))
But how to select the longest and second-longest line using an expression?