Your question could be better laid out, but something along the lines of:
select c.c_id, p_id, sum(total_hours) as total_hours
from consultant c
join project_consultants p on p.c_id = c.c_id
where c.c_id = 105 -- or c.c_first = 'Janet' etc?
group by c.c_id, p.p_id
Mar 24, 2010 at 02:23 PM