between max() and min()
-
Hi, how can i get info on the 2nd max(id) or 3rd min(money) record on a table. I only know how to get min(X) or max(X) record on a table Thanks ;P
-
Hi, how can i get info on the 2nd max(id) or 3rd min(money) record on a table. I only know how to get min(X) or max(X) record on a table Thanks ;P
-
Hi, how can i get info on the 2nd max(id) or 3rd min(money) record on a table. I only know how to get min(X) or max(X) record on a table Thanks ;P
-
Hi, how can i get info on the 2nd max(id) or 3rd min(money) record on a table. I only know how to get min(X) or max(X) record on a table Thanks ;P
To select the 5th lowest (or n-th lowest) replace the "5" in this query with the number you want.
Select max(X) from
(Select top 5 id as X from idTable order by id asc)tTo select the n-th highest replace the "5" in this query with the number you want.
Select min(X) from
(Select top 5 id as X from idTable order by id desc) tCheers!