This Problem can be solved by following
SELECT project_consultant.p_id, SUM(total_hours) Total, project_name, client_name, c_last, c_first, total_hours
FROM consultant, client, project, project_consultant
WHERE consultant.c_id = project.mgr_id
AND client.client_id = project.client_id
AND project.p_id = project.p_id
AND project.p_id = project_consultant.p_id
AND consultant.c_id = project_consultant.c_id
GROUP BY project_consultant.p_id, project_name, client_name, c_last, c_first, total_hours
I Think This Will execute ur querry but the purpose wont be solved if u really need totalling in your reports then use sqlplus commands like compute and break feature
Pl note that when u r using group by with select statements then u should group by all the columns in the select statement on which no function is executed.
:)
SELECT project_consultant.p_id, SUM(total_hours) Total, project_name, client_name, c_last, c_first, total_hours
FROM consultant, client, project, project_consultant
WHERE consultant.c_id = project.mgr_id
AND client.client_id = project.client_id
AND project.p_id = project.p_id
AND project.p_id = project_consultant.p_id
AND consultant.c_id = project_consultant.c_id
GROUP BY project_consultant.p_id, project_name, client_name, c_last, c_first, total_hours
I Think This Will execute ur querry but the purpose wont be solved if u really need totalling in your reports then use sqlplus commands like compute and break feature
Pl note that when u r using group by with select statements then u should group by all the columns in the select statement on which no function is executed.
:)