CREATE VIEW managementnotebook
AS select equipment.eqm_id AS eqm_id , set.setname AS setname , serial.serialnumber AS serialnumber, set.emp_id AS emp_id , employee.name AS name , employee.rank AS rank , employee.grade AS grade , notebook.dep AS dep , notebook.rank_now AS rank_now , notebook.rent_date AS rent_date , notebook.return_date AS return_date , type.typename AS typename , employee.tel AS tel
FROM (((`serial` join (`type` join (`set` join `equipment` on((`set`.`set_id` = `equipment`.`set_id`))) on((`type`.`typ_id` = `equipment`.`typ_id`))) on((`serial`.`srl_id` = `equipment`.`srl_id`)))
join `employee` on((`set`.`emp_id` = `employee`.`emp_id`)))
join `notebook` on((`equipment`.`n_id` = `notebook`.`n_id`)))
WHERE equipment.typ_id = type.typ_id and type.typename = 'Notebook';