It ueses the MySQL Extensions to GROUP BY
and cannot be executed, if the sql_mode
is set to ONLY_FULL_GROUP_BY
.
-- SET sql_mode = ""; -- reset sql_mode and execute statement
SELECT
`courses`.`id` AS `id`,
`courses`.`title` AS `title`,
`courses`.`description` AS `description`,
MATCH (coursedata.title) AGAINST ('Salsa') * 5 + MATCH (coursedata.description) AGAINST ('Salsa') * 2 AS `relevance`
FROM `courses`
INNER JOIN `coursedata` ON `courses`.`id` = `coursedata`.`id`
GROUP BY `courses`.`id`
HAVING `relevance` >= '3'
Is it possible to reach the same effect with standard SQL?