create view fin1 as select o.code, s.organization_name,s.name,s.sex,s.identity_card_number,date_format(s.final_into_association_time,'%Y-%m-%d'),s.number_of_worked_in_association,(year(now())-year(s.begin_working_time)+s.number_of_worked_in_association) as years,s.duty_name,date_format(s.begin_working_time,'%Y-%m-%d'),s.working_state from staff_incumbency s,organization o where s.organization_name =o.name and duty_name not like '%副秘书长%' and duty_name like'%秘书长%' and o.code like '_____0000' and (year(now())-year(s.begin_working_time)+s.number_of_worked_in_association) >=10 and s.state ='valid' order by o.code;create view fin2 as select o.code, s.organization_name,s.name,s.sex,s.identity_card_number,s.number_of_worked_in_association,s.dimission_state,date_format(s.dimission_time,'%Y-%m-%d'),s.dimission_duty_name from staff_dimission s,organization o where s.organization_name =o.name and s.dimission_duty_name not like '%副秘书长%' and s.dimission_duty_name like '%秘书长%' and o.code like '_____0000' and s.number_of_worked_in_association >=10 and s.state ='valid' order by o.code;