L
L
lexstile2018-07-25 21:51:19
SQL
lexstile, 2018-07-25 21:51:19

How to correctly compose a select query so that the sum of two columns is less than the specified value?

there is a simple query:

SELECT * FROM matches WHERE coef_tm_one_half != -1 AND ((coef_tm_one_half > 1.2 AND coef_tm_one_half < 1.25) OR (coef_tm_one_half > 1.8 AND coef_tm_one_half < 1.9)) AND verified = 1 ORDER BY id DESC

how to add to the selection condition so that the sum of the cur_match_score_1 and cur_match_score_2 columns is less than 5 inclusive.
(cur_match_score_1+cur_match_score_2)<5

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2018-07-25
@nozzy

and ((cur_match_score_1+cur_match_score_2)<5)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question