Here is a great answer to that:
SET sql_mode='PIPES_AS_CONCAT';
Find more here: https://stackoverflow.com/a/24777235/4120319
Here's the full SQL:
SET sql_mode='PIPES_AS_CONCAT';
SELECT * FROM tableOne
LEFT JOIN tableTwo
ON tableTwo.query = 'category_id=' || tableOne.category_id;