Example:
SELECT partnumber, manufacturer, condition, SUM(qty), AVG(price), description FROM parts WHERE [something] GROUP BY partnumber, manufacturer, condition
I have several descriptions that are empty, and there can be many part numbers, manufacturers, condition values, and in the group it seems that the first description available is available, which may be empty. Id would like to get the longest description.
I tried this:
MAX(LENGTH(description))
however, returns the number of characters in the string. Is it possible to do what I'm trying to do in MySQL?
mysql
user1336827 Jun 04 2018-12-14T00: 00Z
source share