I have a couple of queries to get latest modified parent\_id

with **max** keyword:

```
select max(parent_id)
from sample_table
where modified_date=(select max(modified_date) 
FROM sample_table
where id = 'test') and id = 'test';

```

with **rownum** keyword:

```
select * 
from (
select parent_id,modified_date
from sample_table
where id = 'test' 
order by modified_date desc) 
WHERE  rownum <= 1 ;

```

Both the queries returning same and correct result.

Which one is better and faster query..