Академический Документы
Профессиональный Документы
Культура Документы
(
dept_ID number(3) constraint funt_dep_PK primary key,
dept_name varchar2(50) NOT NULL
)
VIEWS
OK
2. create view 90_day_report as
select emp_firstname||' '||emp_surname||' has worked '||timesheet_hours||'
hours'||', '||timesheet_OT||' were overtime, in the last 90 days' as "90 Day
report"
from funtom_employee left join funtom_timesheet on emp_ID = timesheet_approved
where (timesheet_wc > sysdate-90)
group by emp_firstname, emp_surname, timesheet_hours, timesheet_OT
;
1.
create view Consultancy_report as
select 'Employee '||emp_firstname||' '||emp_surname||' worked '||
sum(consultancy_hours)||' hours for ' ||customer_name||' charagable '||
sum(activity_rate*consultancy_hours) as"14 day consultancy report"
from funtom_employee join funtom_consultancy on consultancy_emp=emp_ID
join funtom_customer on consultancy_client = customer_id
join funtom_activity on consultancy_activity=activity_id
where(consultancy_date > sysdate-15)
group by emp_firstname,emp_surname,consultancy_hours,customer_name,activity_rate
;
Triggerss
1.
2.
3.