I'm creating a view for assessment entity in SQL Oracle and I created a derived attribute result inside it I tried this code but it's not working.
the assessment is the super-entity for three sub-entities which are diagnostic and summative and formative that is why I'm creating a view for it
assessment = diagnostic + summative + formative.
the result will include the calculation of score attributes from the previous three entities.
this is for Oracle SQL developer
create view assessment as
select asses_num ,d_score ,asses_type ,student_ID from diagnostic union select asses_num ,s_score ,asses_type ,student_ID from summative union select asses_num ,f_score ,asses_type ,student_ID from formative union select (d_score+s_score+f_score) as result from diagnostic, summative, formative ;
I expect to have the view created including result as derived attribute.but, I have error "query block has incorrect number of result columns"