if i have an example table like
id || value_a
I want to select 5 entries where value_a = 1.
Quite simple so far, but now if there are less results than 5, i want to still have 5 results. So if there are 3 entries with value_a = 1, then I want to get those 3 results and 2 other ones where value_a can be anything. How can i achieve this in the best way?
You can order by the result of a comparison calculation, like so: