I have this table data
in SQL which shows the user and the duration, but the duration is some times in pure seconds, while some is mixed between minutes and seconds
One method is to convert the string to a time type and then use time arithmetic:
select datediff(second, 0, cast('00:' + right('0' + duration, 5) as time))
Another method uses just string and number operations:
select cast(left(duration, charindex(':', t) - 1) as int)*60 + cast(right(duration, 2) as int)