MeetFriendz Posted March 10, 2016 Report Posted March 10, 2016 check this one ... you should get answer in one of those ... http://stackoverflow.com/questions/9220944/oracle-getting-maximum-value-of-a-group
loveindia Posted March 11, 2016 Report Posted March 11, 2016 Aa queries endi aa partitions endi man... simple ga SELECT ID_NUM, MAX(Created_Date) as Created_Date FROM Table name GROUP BY ID_NUM This query is enough na to get the desired result set...
Kakateyudu Posted March 11, 2016 Author Report Posted March 11, 2016 Aa queries endi aa partitions endi man... simple ga SELECT ID_NUM, MAX(Created_Date) as Created_Date FROM Table name GROUP BY ID_NUM This query is enough na to get the desired result set... not a group by expression.... (modify chesina sare same created_date tho records vunte i need only 1 baa) paina boys ichina query working.... simple ga vunte chudu baa
loveindia Posted March 11, 2016 Report Posted March 11, 2016 not a group by expression.... (modify chesina sare same created_date tho records vunte i need only 1 baa) paina boys ichina query working.... simple ga vunte chudu baa modify chesina sare antey enti man?? Nuvvu cheppina scenario lo 1 ki enni dates unna max date antey okkatey pull chestundi kada?? Konchem ardam ayyettu cheppava may be with an example..
mettastar Posted March 11, 2016 Report Posted March 11, 2016 Aa queries endi aa partitions endi man... simple ga SELECT ID_NUM, MAX(Created_Date) as Created_Date FROM Table name GROUP BY ID_NUM This query is enough na to get the desired result set... lol thought there is one more column he needs from the table.. u r right... mari aayanaki rendu enduku vasthunayo
CheGuevara Posted March 11, 2016 Report Posted March 11, 2016 modify chesina sare antey enti man?? Nuvvu cheppina scenario lo 1 ki enni dates unna max date antey okkatey pull chestundi kada?? Konchem ardam ayyettu cheppava may be with an example.. May be for each id there will Be more than 1 same created date emo... Nuvvu cheppina query lo distinct pedite aipotundi... But enduku work avvatledu antunnado telidu... Partition adi edi avasaram ledu.. Max funtion and distinct keyword is enough
vikuba Posted March 11, 2016 Report Posted March 11, 2016 May be for each id there will Be more than 1 same created date emo... Nuvvu cheppina query lo distinct pedite aipotundi... But enduku work avvatledu antunnado telidu... Partition adi edi avasaram ledu.. Max funtion and distinct keyword is enough distinct wont work.. Max and group by are the best... assal ee Q adigina TS dev job chesthaada? if yes...he seriously is asking this q? oh pardhuuu
CheGuevara Posted March 11, 2016 Report Posted March 11, 2016 distinct wont work.. Max and group by are the best... assal ee Q adigina TS dev job chesthaada? if yes...he seriously is asking this q? oh pardhuuu Max and group by cheste , distinct use cheyyakapote oka id ki same created max date unte appudu 2 rows vastai kada... Ade distinct use cheste single vastadi kada
vikuba Posted March 11, 2016 Report Posted March 11, 2016 Max and group by cheste , distinct use cheyyakapote oka id ki same created max date unte appudu 2 rows vastai kada... Ade distinct use cheste single vastadi kada group max chestey..eventhough nuv cheppina scenario una..it picks one out of the 2 records anthey kaani..it wont give 2 records with same value. max vaaditey..okatey ravali...thts how the function is designed.
CheGuevara Posted March 12, 2016 Report Posted March 12, 2016 group max chestey..eventhough nuv cheppina scenario una..it picks one out of the 2 records anthey kaani..it wont give 2 records with same value. max vaaditey..okatey ravali...thts how the function is designed. Nuvvu cheppedi confusing ga undi.. Nuvvu cheppe query ekkada padey chusta
vikuba Posted March 12, 2016 Report Posted March 12, 2016 Nuvvu cheppedi confusing ga undi.. Nuvvu cheppe query ekkada padey chusta u are saying based on below data 1 1-1-1999 1 1-1-1999 2 2-2-1999 2 2-2-1999 ... if we use groupby and max ....we will get four records ani? kadha
loveindia Posted March 12, 2016 Report Posted March 12, 2016 lol thought there is one more column he needs from the table.. u r right... mari aayanaki rendu enduku vasthunayo adey kada man... sudden ga ee partitions ivanni chusi enti inta kastapadutunnaru anukunna question chusi wow anukunna man....
loveindia Posted March 12, 2016 Report Posted March 12, 2016 May be for each id there will Be more than 1 same created date emo... Nuvvu cheppina query lo distinct pedite aipotundi... But enduku work avvatledu antunnado telidu... Partition adi edi avasaram ledu.. Max funtion and distinct keyword is enough GROUP BY is the best form of DISTINCT man... using DISTINCT for hiding data is a crime man...
loveindia Posted March 12, 2016 Report Posted March 12, 2016 u are saying based on below data 1 1-1-1999 1 1-1-1999 2 2-2-1999 2 2-2-1999 ... if we use groupby and max ....we will get four records ani? kadha he is wrong nooo aamphat man....
Recommended Posts