sql select min

Solutions on MaxInterview for sql select min by the best coders in the world

showing results for - "sql select min"
Jaret
29 Feb 2016
1-- This gives you the customer name and balance for
2-- the customer with the lowest balance.
3
4select CustomerName, Balance -- start your query as normal
5from Customers
6where Balance = ( -- now when specifying where, you do another query
7  select MIN(Balance) -- where you select the lowest balance
8  from Customers
9);