i have a set of data
product, hour, sales
col1,1,234
col1,1,345
col2,1,456
col2,1,345
col1,2,342
col1,2,6543
col2,2,23
col2,2,634
What I need
col1, 1, 234, 345
what I am getting
col1, 1, 234, 234
col1, 1, 345, 345
select
distinct (hour),
product,
max(sales),
min(sales)
from
table...