Q) How to Find Max Date from each Group? (Asked in Infosys
(INFI)Interview)

Answer Posted / suman rana

select market_id, mkt_name, sale_dt from (
select market_id, mkt_name, sale_dt, max(sale_dt) over
(partition by market_id, mkt_name ) Max_sale_dt
from market )
where sale_dt = Max_sale_dt

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write text literals in oracle?

610


What happens to indexes if you drop a table?

698


How to convert numbers to characters in oracle?

588


How many anonymous blocks can be defined?

585


Explain the use of rows option in exp command.

585






What is integrity and what is constraint??Explain with example

1699


what is difference between sql plus and sql*plus? (not sql and sql plus).

3348


How to estimate disk space needed for an export job?

562


What are the uses of Database Trigger ?

1101


how to handle exceptions in post production

950


Which is better Oracle or MS SQL? Why?

5435


How do we represent comments in oracle?

627


What is oracle join syntax?

570


How to write a left outer join with the where clause in oracle?

629


Why is oracle so popular?

561