Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active January 2, 2018 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lewiscowles1986/9dfbd501dc714d9d422de3e8527ce9c5 to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/9dfbd501dc714d9d422de3e8527ce9c5 to your computer and use it in GitHub Desktop.
MySQL Bar chart Thing
/* Note that decimals can be passed but will be truncated to integer values */
SELECT REPEAT('█', 7) AS 'Percent'
UNION ALL
SELECT REPEAT('█', 7.5)
UNION ALL
SELECT REPEAT('█', 5)
UNION ALL
SELECT REPEAT('█', 15)
@Lewiscowles1986
Copy link
Author

Lewiscowles1986 commented Jan 2, 2018

image

@Lewiscowles1986
Copy link
Author

NOTE: Use UNION ALL or duplicate values will be eliminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment