SELECT
SUM(wlt='W') AS win,
SUM(wlt='L') AS loss,
SUM(wlt='T') AS tie
from games
where team1 = '$team'
group by year
order by year limit 1
Normally this type of query would be done better with a subquery
SELECT
SUM(wlt='W') AS win,
SUM(wlt='L') AS loss,
SUM(wlt='T') AS tie
from games
where team1 = '$team'
and year in (select min(year) from games where team = '$team')
but this is not supported by Mysql.