Home » SQL & PL/SQL » SQL & PL/SQL » co related subquery written in Analytical functions
co related subquery written in Analytical functions [message #677538] Tue, 24 September 2019 20:41 Go to next message
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 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

From your previous topics:

Michel Cadot wrote on Wed, 25 September 2019 08:03
Michel 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:20
From your previous topics:

BlackSwan wrote on Wed, 11 April 2012 16:43
Please 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

Re: co related subquery written in Analytical functions [message #677543 is a reply to message #677538] Wed, 25 September 2019 03:25 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
chavva.kiru@gmail.com wrote on Wed, 25 September 2019 02:41


it is throwing
What is it throwing?

It helps to re-read you post before submitting it.
Re: co related subquery written in Analytical functions [message #677544 is a reply to message #677543] Wed, 25 September 2019 03:31 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Just the mark of his natural contempt toward others.

Previous Topic: display issue
Next Topic: Writing Query but not getting desired output
Goto Forum:
  


Current Time: Fri Apr 19 15:58:07 CDT 2024