Creating views - percentages and multiple tables. Newbie [message #598155] |
Thu, 10 October 2013 13:30 |
|
bmartin1uk
Messages: 2 Registered: October 2013
|
Junior Member |
|
|
Hi folks
I'm very new to Oracle and SQL, and i'm having trouble with a little assignment.
"Create a view named vuPassFailRate that will show the pass rate and fail rates of each test."
I have a table named Test_ID containing the following columns:
TEST_ID
TEST_NAME
PASSING_GRADE
And another table named Test_History containing the following columns:
TEST_ID
STUDENT_ID
SCORE
I'm assuming i have to create an inline view, and to work out the pass/fail rates i need to do something along the lines of (For pass rate) Where SCORE is greater than or equal to PASSING_GRADE, and TEST_ID equals TEST_ID, divide by a count of SCORE and multiply by 100.
I just cant work out the nested select statements, and work out the formula using two columns in two tables.
I have been staring at this problem for so long now i cant see the wood for the trees.
I appreciate any help people can offer.
Thanks
Ben
|
|
|
|
|
|