Select those entries where the relationship of the columns f1:f2:f3 is roughly number1:number2:number3 I have three columns f1, f2 and f3

f1  f2  f3 
1   3   5
5   7   3
...


My goal is to select those entries where the relationship of f1:f2:f3 is roughly(+-2) number1:number2:number3

Example:

SELECT those rows where the relationship is roughly 5:7:4 -&gt; Result 5 7 3.


What does the SELECT command look like?
Maybe something like ...

-- test table and data

CREATE TABLE `t` (
    `f1`    INTEGER,
    `f2`    INTEGER,
    `f3`    INTEGER
);


insert into t ( f1, f2, f3 )
values (1,3,5),(5,7,3);

select * from t;

f1  f2  f3
1   3   5
5   7   3


Query:

   -- roughly 5:7:4 :: +/-1

    select * from t
    where ( 
          ( f1 between 4 and 6 ) 
      and ( f2 between 6 and 8 )
      and ( f3 between 2 and 4 )
    ) ;

    -- result
    f1  f2  f3
    5   7   3


Dbfiddle

--  roughly 5:7:4 :: +2

select * from t
where ( 
      ( f1 between 5 and 7 ) 
  and ( f2 between 7 and 9 )
  and ( f3 between 4 and 6 )
) ;

-- no rows returned