documentation/Reference Code/Wedge/installation/mysql/is4c_op/views/subdeptIndex.viw
use is4c_op;
DROP VIEW IF EXISTS `subdeptIndex`;
CREATE VIEW `subdeptIndex` AS
select
`p`.`upc` AS `upc`,
`p`.`department` AS `department`,
`d`.`dept_name` AS `dept_name`,
`p`.`subdept` AS `subdept`,
`s`.`subdept_name` AS `subdept_name`
from ((products p join departments d) join subdepts s)
where ((`p`.`department` = `d`.`dept_no`) and (`p`.`subdept` = `s`.`subdept_no`))
group by `p`.`upc`