Topics Topics Help/Instructions Help Edit Profile Profile Member List Register Paatha Gnyapakaalu - Archives from Old DB  
Search New Posts 1 | 2 | 8 Hours Search New Posts 1 | 3 | 7 Days Search Search Tree View Tree View Latest tweets Live Tweets   Hide Images
Bewarse Talk Discussion Board * Archives - 2012 * Cine Talk - Reviews, Gossips, Insider Info etc. * Archive through December 31, 2012 * SQL Query Help < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 792
Registered: 05-2011
Posted From: 108.204.255.186
Posted on Friday, December 21, 2012 - 11:24 pm:    Edit Post Delete Post Print Post

katraveli and foolarangadu MOVIEART--thottigang
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 791
Registered: 05-2011
Posted From: 108.204.255.186
Posted on Friday, December 21, 2012 - 11:21 pm:    Edit Post Delete Post Print Post

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...
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 22570
Registered: 06-2004
Posted From: 99.67.74.174
Posted on Friday, December 21, 2012 - 7:32 pm:    Edit Post Delete Post Print Post


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 :-)
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 790
Registered: 05-2011
Posted From: 108.231.134.207
Posted on Friday, December 21, 2012 - 7:19 pm:    Edit Post Delete Post Print Post

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...
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 788
Registered: 05-2011
Posted From: 108.231.134.207
Posted on Friday, December 21, 2012 - 7:13 pm:    Edit Post Delete Post Print Post

bemam..manam queries rayadam lo eek aaa MOVIEART--avataram
Top of pagePrevious messageNext messageBottom of page Link to this message

Lenevo
Pilla Bewarse
Username: Lenevo

Post Number: 787
Registered: 05-2011
Posted From: 108.231.134.207
Posted on Friday, December 21, 2012 - 7:12 pm:    Edit Post Delete Post Print Post

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..
Top of pagePrevious messageNext messageBottom of page Link to this message

Katravelli
Pilla Bewarse
Username: Katravelli

Post Number: 731
Registered: 09-2012
Posted From: 75.146.203.60
Posted on Friday, December 21, 2012 - 3:32 pm:    Edit Post Delete Post Print Post


Ferrari:




Aa emdi.... Em kaavalna CLIPART--beatingdeadhorse
Top of pagePrevious messageNext messageBottom of page Link to this message

Ferrari
Yavvanam Kaatesina Bewarse
Username: Ferrari

Post Number: 8993
Registered: 09-2010
Posted From: 75.73.190.113
Posted on Friday, December 21, 2012 - 3:03 pm:    Edit Post Delete Post Print Post


Katravelli:


myathreMOVIEART--avataram
Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
Top of pagePrevious messageNext messageBottom of page Link to this message

Katravelli
Pilla Bewarse
Username: Katravelli

Post Number: 727
Registered: 09-2012
Posted From: 75.146.203.60
Posted on Friday, December 21, 2012 - 2:45 pm:    Edit Post Delete Post Print Post

MOVIEART--bm ee roju selavu...soo choodamu
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 22569
Registered: 06-2004
Posted From: 99.67.74.174
Posted on Friday, December 21, 2012 - 2:40 pm:    Edit Post Delete Post Print Post


Ferrari:

bemmam maayya oka 15 minutes lo answer kooda ettu as usual gaa




google lo ethukuthunna..vasthe edatha MOVIEART--ali
Top of pagePrevious messageNext messageBottom of page Link to this message

Ferrari
Yavvanam Kaatesina Bewarse
Username: Ferrari

Post Number: 8992
Registered: 09-2010
Posted From: 75.73.190.113
Posted on Friday, December 21, 2012 - 2:39 pm:    Edit Post Delete Post Print Post

bemmam maayya oka 15 minutes lo answer kooda ettu as usual gaaMOVIEART--bwalk
Nandamuri Taraka Rama Rao - Sachin Ramesh Tendulkar
Top of pagePrevious messageNext messageBottom of page Link to this message

Sasibabu
Mudiripoyina Bewarse
Username: Sasibabu

Post Number: 10294
Registered: 10-2010
Posted From: 76.185.191.220
Posted on Friday, December 21, 2012 - 2:34 pm:    Edit Post Delete Post Print Post

(A+b)2 = A2+B2+2AB
http://i49.tinypic.com/mhdc11.jpg
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 22568
Registered: 06-2004
Posted From: 99.67.74.174
Posted on Friday, December 21, 2012 - 2:07 pm:    Edit Post Delete Post Print Post

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?
Top of pagePrevious messageNext messageBottom of page Link to this message

Ravanabrahma
Celebrity Bewarse
Username: Ravanabrahma

Post Number: 22567
Registered: 06-2004
Posted From: 99.67.74.174
Posted on Friday, December 21, 2012 - 2:06 pm:    Edit Post Delete Post Print Post

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?

Topics | Last Hour | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration