I have a table in my mysql database which has a column score and a column cluster.
score is float and cluster may be NULL or integer.
NULL means the row belongs to no cluster, an integer means it does. so of course multiple rows can have the same cluster id.
I want to select all rows that are either NULL or the ones of a cluster that have the highest score.
Is it possible to do in a select or in a select/union constellation or with temperary tables? what is the fastest way?
If I understood your question, then: