|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Difficult Query
Hello...
I have a table defined as follows: Table ----- activityDate (Date), activityRank (Number), activityOwner (String) I need to create a query that displays the number of times each activityRank is displayed in 2 separate years. There are 4 available ranks The query then groups the items by the activity owner. Think of it as the following: Owner 1 -------- Year 1: Rank 1: 0, Rank 2: 5, Rank 3: 6, Rank 4: 3 Year 2: Rank 1: 2, Rank 2: 4, Rank 3: 2, Rank 4: 0 Owner 2 -------- Year 1: Rank 1: 1, Rank 2: 1, Rank 3: 1, Rank 4: 2 Year 2: Rank 1: 3, Rank 2: 0, Rank 3: 1, Rank 4: 5 Owner x -------- Year 1: ..... Year 2: ..... I am just not able to come up with an efficient query that groups properly and returns all of the information I need. Thank you |
|
#2
|
|||
|
|||
|
Please disregard... I have solved the problem
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Difficult Query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|