Return string of minimum length in MySQL database
You can get it by sub query.
select type, sum(amount), item
from inventory
group by type
having length(item) <= (select min(length(item)) from inventory)
User Order By columnName ASC /DESC
for sorting
and LIMIT 1
for getting one out of that