Jump to content

Oracle Guru's Ki Oka Question


Kakateyudu

Recommended Posts

  • Replies 39
  • Created
  • Last Reply

Top Posters In This Topic

  • Kakateyudu

    9

  • loveindia

    8

  • vikuba

    6

  • mettastar

    5

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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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..
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

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... 

Link to comment
Share on other sites

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....

Link to comment
Share on other sites

×
×
  • Create New...