Author |
Message |
Lenevo
Pilla Bewarse Username: Lenevo
Post Number: 792 Registered: 05-2011 Posted From: 108.204.255.186
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 11:24 pm: |
|
katraveli and foolarangadu |
Lenevo
Pilla Bewarse Username: Lenevo
Post Number: 791 Registered: 05-2011 Posted From: 108.204.255.186
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 11:21 pm: |
|
rank function depends on over and partition clause... , work ayyindi kadaa..inka litee .. back end sql query ayithe kekaa eyyi ,,, manaki coding antee finger tips meda untadi... |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 22570 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 7:32 pm: |
|
Lenevo:
lenovo baa..thanks for the help. there were 2 columns, changed date and last_change_date. so oka query raasi order by change date annanu and rownum = 1 annanu. latest row vachindi. induloni last_change_date = ani subquery rasanu where changed_date = last_change_date ani. and I used salary >= 50000 and < 50000 vaadanu. its working good If the performance is bad, then I will try to use the rank function that you said. I tried to use that but didn't understand exactly the rank over partition. konchem chadivi chestha idi |
Lenevo
Pilla Bewarse Username: Lenevo
Post Number: 790 Registered: 05-2011 Posted From: 108.231.134.207
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 7:19 pm: |
|
Bemam .. Metho 2 Assign ranks for salarys order by date.. it assigns 3 ranks .. if there is a change.. is samee then assignbs same rank to same salary.. that means sal not sanged in consequtive years.. where caluse eti kavalsindi filter out... |
Lenevo
Pilla Bewarse Username: Lenevo
Post Number: 788 Registered: 05-2011 Posted From: 108.231.134.207
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 7:13 pm: |
|
bemam..manam queries rayadam lo eek aaa |
Lenevo
Pilla Bewarse Username: Lenevo
Post Number: 787 Registered: 05-2011 Posted From: 108.231.134.207
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 7:12 pm: |
|
deniki google henduku bemmam.. Get max of date - sal = 48,200 inko query 2 get top 1 sal where dt < max_dt order by dt desc ; = 55000 2 queries self join cheyyi on id ..and sal <> both ani.. You will get result.. |
Katravelli
Pilla Bewarse Username: Katravelli
Post Number: 731 Registered: 09-2012 Posted From: 75.146.203.60
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 3:32 pm: |
|
Ferrari:
Aa emdi.... Em kaavalna |
Ferrari
Yavvanam Kaatesina Bewarse Username: Ferrari
Post Number: 8993 Registered: 09-2010 Posted From: 75.73.190.113
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 3:03 pm: |
|
Katravelli:
myathre Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
|
Katravelli
Pilla Bewarse Username: Katravelli
Post Number: 727 Registered: 09-2012 Posted From: 75.146.203.60
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:45 pm: |
|
ee roju selavu...soo choodamu |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 22569 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:40 pm: |
|
Ferrari:bemmam maayya oka 15 minutes lo answer kooda ettu as usual gaa
google lo ethukuthunna..vasthe edatha |
Ferrari
Yavvanam Kaatesina Bewarse Username: Ferrari
Post Number: 8992 Registered: 09-2010 Posted From: 75.73.190.113
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:39 pm: |
|
bemmam maayya oka 15 minutes lo answer kooda ettu as usual gaa Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
|
Sasibabu
Mudiripoyina Bewarse Username: Sasibabu
Post Number: 10294 Registered: 10-2010 Posted From: 76.185.191.220
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:34 pm: |
|
(A+b)2 = A2+B2+2AB http://i49.tinypic.com/mhdc11.jpg
|
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 22568 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:07 pm: |
|
latest row salary ni anthaku mundu record salary tho compare chesi if the latest row salary moved to < 50K kabatti latest row display cheyyali. ela rayali query? |
Ravanabrahma
Celebrity Bewarse Username: Ravanabrahma
Post Number: 22567 Registered: 06-2004 Posted From: 99.67.74.174
Rating: N/A Votes: 0 (Vote!) | Posted on Friday, December 21, 2012 - 2:06 pm: |
|
naaku oka table A undi. A Data: ID Salary change_date 123 48,200 09/10/2012 123 55,000 05/01/2012 123 54,000 04/01/2012 I want to display the latest row from the table by using the change_date if the salary changed either to > 50,000 or to < 50,000 so for an ID in the table 3 rows exists. I need to check the latest row salary is either moved to > 50K or < 50K and diplay the latest row. current data lo for ID 123, the latest row salary was changed to < 50K so need to display that latest row. ela rayali query? |