oracle - Tricky SQL for a report -
i have table following 4 columns.
student_id course_id seq_no date_taken
looking on sql oracle db following report.
possible report in single query using sub queries?
course_id | cr150 ============================================= total students taken | 5 students taken first course | 3 course taken students | 3 students taken 2 courses | 2
you need nested query. inner query should use analytic query select student , course, how many courses student taking, , course in sequence. can use in of group query gives report want.
i give sql won't because homework problem, not mine. http://www.orafaq.com/node/55 may learn how analytic queries.
Comments
Post a Comment