Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我可以通过分区 sql 查询获得 first_value() 和 last_value(),该查询按我知道的列排序,但是假设我想要第二个值或第三个值......有没有这样做的函数?提前致谢。
据我所知,没有具体的功能。但是,您可以像这样选择第二行:
with row_numbers AS(select row_number() over(order by yourColumn) as 'row', * from table) select * from row_numbers where row=2