sql - List a column value that has a certain number or great, referencing two tables -
i have 2 tables named project , task. check below portion out of tables:
project
projectnumber projecttitle
task
projectnumber tasknumber hours
i need list project have @ least 2 tasks, displaying project number, how many tasks project, , total number of hours worked on tasks project.
i'm not sure how because there multiple tasks 1 project. information appreciated. thank you!
if table needed, i'm not sure how can add because can't link websites. also, in sqlplus.
i think should work:
select projectnumber, count(*) count_of_tasks sum(hours) sum_hours task group projectnumber having count(*)>1
Comments
Post a Comment