I have a table called "Inventory" that I need to find the max value of column labeled "ID". The data in the column looks like this: ID column data
The ID is made up of text, relevant to the item, followed by a hex value (TB-00001). What I am trying to do is return the max value of the column, but I only need the max value of a certain ID. For example, if the user enters in "TB" in a text field, return the max value of only the ID's that have "TB" in their ID. If a user enters in "WCM", return the max value of only the ID's that have "WCM" in their ID. And so on...
I have the following code, but it is only returning the max value of the entire column:
SELECT MAX(Inventory.ID) AS "ID" FROM Inventory
Thank you in advance.