I have a table with columns ‘year’, ‘month’ and ‘price’. Created a variable from the year and month to create a date to be used to filter the table.
SELECT
@date_create := STR_TO_DATE(CONCAT(`year`, '-', `month`, '-1'), '%Y-%m-%d'),`price`
FROM table
WHERE
@date_create >= '2023-05-01'
MYSQL returns 0 results but it shouldn’t. What is wrong with the query?