• I'm not sure I can manage all that in a single query, however a stored procedure would be straightforward enough: use statements like select top 1 where <, select top 1 where >, to find the lower and upper bracker, if they are the same return that, if one or both ends of the bracket is/are null then whatever, else take an average. Bit more work if you want a weighted average.

    By the way, can I suggest that you give your table a single 'Length' (or whatever it is measuring) column, rather than one for feet and one for inches?