简体   繁体   English

aws redshift中是否有任何function以找出第二大记录? 或者如果没有 function 什么以及如何找出第二大记录?

[英]Is there any function in aws redshift to find out the second largest record ?? or if no function what and how to find out the 2nd largest record?

select * 
from peb_gateway_info pgi 
order by 'name' desc limit 1,1;

在此处输入图像描述

using offset?使用偏移量?

select * 
from peb_gateway_info pgi 
order by name desc limit 1 offset 2;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM