Dollars and Percentages
👤 This documentation is intended for SQL Users.
Formatting as Dollars
To format a numeric column as dollars, use ":$" in the formatter:
select [my_numeric_column:$] from...
For example, to format the total price as dollars:
select [sum(price):$] from purchases;
This will display a comma-delimited number with a dollar sign and two decimal points:
![](https://cdn.prod.website-files.com/58fe8f93dc9e750ca84ebb16/5c006f6de59b2e507107d5b9_Dollar%20Format.png)
Formatting as Percentage
To format a numeric column as a percentage, use ":%" in the formatter:
select [my_numeric_column:%] from...
For example, to format the fraction of users who purchase as a percentage:
select [cast(count(distinct purchases.user_id) as numeric)/count(1):%]
from purchases left join users on user_id = users.id
This will display an integer percentage with a percent sign:
![](https://cdn.prod.website-files.com/58fe8f93dc9e750ca84ebb16/5c006ffddaf9c9de02820951_Percentage.png)
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form