sql - i want to recover the value of column according to the last date till the date i will insert and want to recover the 2nd maximum salary -
employee table amount 100.62
04/04/2013
, 102.62
05/04/2013
, on, want recover value amount according last maximum date , want second maximum incremented salary of person
and tried these query till noq problem
i new in sql server , write like
select amount employee max(date)<=15/04/2013
and
select top1 employee(select top2 employee order salary desc) order salary
you use offset fetch clause. example second query this:
select * employee order salary desc offset 1 rows fetch next 1 rows
Comments
Post a Comment