Sql- repeat()

When I’m executing the following query for the given question it is working fine and gives the required result. But the problem is the loop for Repeat not getting ended! Tried END or END REPEAT but showing an error. How to solve it?


Write a query to display the first eight characters of the employees’ first names and indicates the
amounts of their salaries with ‘$’ sign. Each ‘$’ sign signifies a thousand dollars. Sort the data in
descending order of salary

SELECT left(first_name, 8),
REPEAT(’$’, FLOOR(salary/1000)) ‘Each $ sign signifies a thousand dollars’, salary
FROM employees