[Solved] select id by the min and max (sql) [closed]


You can use the MAX() and MIN() function to get the ids having largest and the id having smallest discount.

Select id,discount
from customer 
where discount=(select MAX(discount) from customer) OR discount=(select MIN(discount) from customer);

3

solved select id by the min and max (sql) [closed]