Code:
select max(date2), min(date2)
from datetab
Code:
select node_id,max(date2), min(date2)
from datetab
group by node_id