Is there a neat SQL query that would return rows so that only first occurrences of rows, that have same data in the first column, would be returned? That is, if I have rows like
blah something
blah somethingelse
foo blah
bar blah
foo hello
the query should give me the first, third and fourth rows (because first row is the first occurrence of "blah" in the first column", third row is the first occurrence of "foo" in the first column, and fourth row is the first occurrence of "bar" in the first column).
I'm using H2 database engine, if that matters.
Update: sorry about the unclear table definition, here's it better; the "blah", "foo" etc. denote the value of the first column in the row.
blah [rest of columns of first row]
blah [rest of columns of second row]
foo [-""- third row]
bar [-""- fourth row]
foo [-""- fifth row]