SQL Language (MOSC)

MOSC Banner

Max common element in query

edited Jan 10, 2012 5:46AM in SQL Language (MOSC) 6 commentsAnswered ✓
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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center