我有两张桌子
CREATE TABLE `A_Lab_Project` (
`subject_code` varchar(8) NOT NULL,
`semester` int(11) NOT NULL DEFAULT '0',
`branch_code` varchar(3) NOT NULL DEFAULT '',
`component` varchar(50) DEFAULT NULL,
`course_outcome` int(11) DEFAULT NULL,
`max_marks` int(11) DEFAULT NULL,
`syear` varchar(6) DEFAULT NULL,
`eyear` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `A_Lab_Program` (
`subject_code` varchar(8) NOT NULL,
`semester` int(11) NOT NULL DEFAULT '0',
`branch_code` varchar(3) NOT NULL DEFAULT '',
`Question_no` varchar(50) DEFAULT NULL,
`Marks_co1` int(11) DEFAULT NULL,
`Marks_co2` int(11) DEFAULT NULL,
`Marks_co3` int(11) DEFAULT NULL,
`Marks_co4` int(11) DEFAULT NULL,
`syear` varchar(6) DEFAULT NULL,
`eyear` varchar(20) DEFAULT NULL )
我需要
100*(v1+v2)/v3+v4 ;
v1 = select sum(course_outcome) from A_Lab_Project where subject_code='12csa34',
v2 = select sum(max_co) from A_Lab_Program where subject_code='12csa34',
v3 = select max_marks from A_Lab_Project where subject_code='12csa34'
在子查询中请帮我写一个子查询。