Max common element in query
Hi,
I want to extract the later common element from a table. In the example below I want to extract the latest common date that both machines (1 and 2) had been on the status 'On'.
Machine1 20120101 Off
Machine1 20120102 On
Machine1 20120103 On
Machine1 20120104 Off
Machine2 20120101 Off
Machine2 20120102 On
Machine2 20120103 Off
Machine2 20120104 On
So my query must return the date 20120102 as result.
Thanks,
Otmane
I want to extract the later common element from a table. In the example below I want to extract the latest common date that both machines (1 and 2) had been on the status 'On'.
Machine1 20120101 Off
Machine1 20120102 On
Machine1 20120103 On
Machine1 20120104 Off
Machine2 20120101 Off
Machine2 20120102 On
Machine2 20120103 Off
Machine2 20120104 On
So my query must return the date 20120102 as result.
Thanks,
Otmane
0