Answer the question
In order to leave comments, you need to log in
How to exclude incomplete repetitions of lines?
There is a table:
There is a query:
SELECT
SIGN(COALESCE(location_id, 0)) + SIGN(COALESCE(division_id, 0)) + SIGN(COALESCE(position_id, 0)) as score,
keyword.*
FROM
keyword
WHERE
(city_id = 5 OR city_id IS NULL) AND
(location_id = 7 OR location_id IS NULL) AND
division_id IS NULL AND
position_id IS NULL AND
MATCH (keyword) AGAINST ('еда банкомат')
GROUP BY
title
DESC
ORDER BY
score
DESC
LIMIT 10
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question