SELECT *,
-- to search from the end, we need to operate on reversed string
reverse(substr(
-- "46_68x.73cf.41-1.9.0-ilc-8402" instead of "2048-cli-0.9.1-14.fc37.x86_64"
reverse(pkg),
-- substr with os identifier starts after the first found dot
charindex('.', reverse(pkg))+1,
-- and ends before the second found dot
charindex('.', substr(reverse(pkg), charindex('.', reverse(pkg))+1))-1
)) as os,
reverse(substr(reverse(pkg), 0, charindex('.', reverse(pkg)))) as arch
FROM available