MAX() with group by in Teradata

You can use MAX function with GROUP BY as below.

Syntax:
SELECT column1, MAX(expression )
FROM tables
WHERE predicates
GROUP BY column1;


Example:
idnamework_datedaily_typing_pages
1John2007-01-24250
2Ram2007-05-27220
3Jack2007-05-06170
3Jack2007-04-06100
4Jill2007-04-06220
5Zara2007-06-06300
5Zara2007-02-06350


SELECT id, name, work_date, MAX(daily_typing_pages)
FROM tbl_sample GROUP BY name;


Output:
idnamework_dateMAX(daily_typing_pages)
3Jack2007-05-06170
4Jill2007-04-06220
1John2007-01-24250
2Ram2007-05-27220
5Zara2007-06-06350