So I'm trying to query to get someones salary, then display a '$' based on the number of thousands they earn.
So example, is someone makes $15,000 I would have another column displaying '$$$$$$$$$$$$$$$'
I can get as far as this:
SELECT e.last_name,
e.salary,
REPLACE(e.salary/1000, e.salary/1000, '$') AS "Graphic"
FROM EMPLOYEES e
ORDER BY e.salary DESC, e.last_name
But I dont know how to display a certain number of '$'
RPAD should work (you may need to adjust the rounding a little):
select rpad('$', round(salary/1000), '$') as "Graphic" from employees
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With