但是当第二高记录不存在时, 该SQL返回空而不是 null.
刚试了一下,用 group + order
select Salary as SecondHighestSalary from Employee group by Salary order by Salary limit 1,1
Input: {"headers": {"Employee": ["Id", "Salary"]}, "rows": {"Employee": [[1, 100]]}}
Output: {"headers": ["SecondHighestSalary"], "values": []}
Expected: {"headers": ["SecondHighestSalary"], "values": [[null]]}
找第100高的, 估计只能用你上面的这个方法了。
但是当第二高记录不存在时, 该SQL返回空而不是 null.
刚试了一下,用 group + order
select Salary as SecondHighestSalary from Employee group by Salary order by Salary limit 1,1
Input: {"headers": {"Employee": ["Id", "Salary"]}, "rows": {"Employee": [[1, 100]]}}
Output: {"headers": ["SecondHighestSalary"], "values": []}
Expected: {"headers": ["SecondHighestSalary"], "values": [[null]]}
嗯就是没有记录吧
你过的是英国的时间么?天天晚睡,记得保养啊
我是真的睡不着。。。。我也没办法。。。
你男人呢?
他也是睡眠不规律。不过他比我入睡更容易一些。