Home » SQL & PL/SQL » SQL & PL/SQL » needs value at intersection
needs value at intersection [message #11132] Mon, 08 March 2004 18:22 Go to next message
Riaz
Messages: 112
Registered: February 2002
Senior Member
Hi.
I have the follwing table.

SQL> desc src
Name
-----------------
REG_NO
SEMESTER_CODE
SEMESTER_YEAR
GRADECHARVALUE
OPTIONAL
COURSE_SEQ_NO
COURSE_CODE

I want to have the follwing result for a particular semester/year.

CS101 PH101

CS101 100 1
PH101 0 150
where the digit at the intersection describes the number of students taking both the courses.
i.e. 1 (belwo PH101) means that there is only 1 student taking both CS101 and PH101 courses. I have tried it in PL and Reports6i. But could not solve the problem.
Please help....

Cheers!
Re: needs value at intersection [message #11169 is a reply to message #11132] Wed, 10 March 2004 04:15 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
See http://www.orafaq.com/faqsql.htm#MATRIX

Best regards.

Frank
Previous Topic: Showing result of query horizontally
Next Topic: SQL to access 2 database's with one query
Goto Forum:
  


Current Time: Fri Apr 19 04:07:24 CDT 2024