Hi,
There is small change in requirement from last thread as below - (added one more column as data)
WITH t AS (
SELECT 'A' Data, '01-JAN-19' as dates, 1 as first, 2 as second, 3 as third FROM DUAL UNION ALL
SELECT 'A', '02-JAN-19' as dates, 3 as first, 9 as second, 200 as third FROM DUAL UNION ALL
SELECT 'A', '03-JAN-19' as dates, 10 as first, 8 as second, 30 as third FROM DUAL UNION ALL
SELECT 'B', '02-JAN-19' as dates, 3 as first, 9 as second, 200 as third FROM DUAL UNION ALL
SELECT 'B', '03-JAN-19' as dates, 10 as first, 8 as second, 30 as third FROM DUAL
) SELECT * FROM t;
Requirement -
200 is maximum in these three columns so I want result as below, Date, Max Value and half of max value.
A 02-JAN-19, 200, 100
B 02-JAN-19, 200, 100