Suppose there exists a table with various posts representing qualities of the object e.g. Colour, Size, Model... a lot more. Exactly how should we obtain the best matching row when we query for Colour= red-colored, Size= M and Model = x. I wish to obtain the row which fits the majority of the criteria specified so possibly
- Red-colored,null, null
- Red-colored, M, null
Here' should obtain the 3rd row.
You can just produce a SQL Situation expression that returns or 1 (as well as fractional values if you are really picky) and sum within the values for that posts in every record, after which apply max to that particular pseudo-column.