co related subquery written in Analytical functions [message #677538] |
Tue, 24 September 2019 20:41 |
|
chavva.kiru@gmail.com
Messages: 23 Registered: April 2012 Location: hyderabad
|
Junior Member |
|
|
Hi,
Can We write corelated subquery in Analytical functions.
select a.A_ID,c.C_ID,(select * from (select rank() over(order by c.trans_date desc) rn
from C c where a.A_ID=b.B_A_PK
and c.c_a_PK=a.A_ID
and c.c_b_PK=b.B_ID) where rn=1)
Closed_count from A a,B b
where a.A_ID=b.B_A_PK
and c.c_a_PK=a.A_ID
and c.c_b_PK=b.B_ID
/
it is throwing
|
|
|
Re: co related subquery written in Analytical functions [message #677542 is a reply to message #677538] |
Wed, 25 September 2019 01:04 |
|
Michel Cadot
Messages: 68658 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
From your previous topics:
Michel Cadot wrote on Wed, 25 September 2019 08:03Michel Cadot wrote on Thu, 06 October 2016 07:30
From your previous topic:
Michel Cadot wrote on Mon, 19 January 2015 07:22
From your previous topic:
Michel Cadot wrote on Thu, 16 August 2012 16:20From your previous topics:
BlackSwan wrote on Wed, 11 April 2012 16:43Please read and follow the forum guidelines, to enable us to help you:
http://www.orafaq.com/forum/t/88153/0/
BlackSwan wrote on Wed, 11 April 2012 20:29...
READ & FOLLOW the Posting Guidelines! http://www.orafaq.com/forum/t/88153/0/
With any SQL question, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.
Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Regards
Michel
In addition, Barbara helped you so much in your previous topics providing you codes and examples and you did never feedback and thank her.
Are you the kind of parasite we saw too much in these days?
Or are you a valuable person who deserves to be helped?
[Updated on: Wed, 25 September 2019 01:04] Report message to a moderator
|
|
|
|
|