I need to return two max dates from two different columns within the same table. I want the result to be in the same line. This is my table data:
If i have this          
store   item    tran-code   date
1788    2004635    1      17.05.27
1788    2004635    2      17.05.27
1788    2004635   30      17.05.26
1788    2004635    2      17.05.21
1788    2004635    1      17.05.21
1788    2004635    2      17.05.20
1788    2004635    1      17.05.20
and i want this…
store   item    tran-code   date
1788    2004635    1      17.05.27
1788    2004635    30     17.05.26
but if you could get me to return this, it will be perfect
store   item      date_1    date_30
1788    2004635  17.05.27   17.05.26
where date_1 is the max date for tran-code = 1 and date_30 is the max date for tran-code = 30
 
     
     
     
    