For example, I have the following table:
pc | cd
---------------
pc0 | 4x
pc1 | 24x
pc2 | 8x
pc3 | 4x
pc4 | 24x
I need to get something like this:
cd_max
--------
24x
or get it sorted:
pc | cd
---------------
pc0 | 4x
pc3 | 4x
pc2 | 8x
pc1 | 24x
pc4 | 24x
'24x' is obviously string but I need to get maximum/minimum of integers inside it.
I'm using MS SQL Server.