select 1 + max(substring (id from 4 for 4))::int from estudante where campus_id in (select id from campus where delegacao_id = '01') and substring(id from 3 for 1) = '.' and substring (id from 9 for 4) = '2009'
and substring (id from 1 for 2) = '01'