Skip to content

Commit

Permalink
Add unit column names guideline.
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallRees authored and sean-rose committed Nov 30, 2021
1 parent 3834d3b commit 39de087
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sql_style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,15 @@ left join some_exceedingly_long_name on orders.some_exceedingly_long_name_id = s

<br>

#### Columns which represent numeric values with a known unit should be suffixed with that unit.
Some examples:
- `price_usd`
- `weight_oz`
- `weight_kg`
- `weight_grams`

<br>

#### Avoid using unnecessary table aliases, especially initialisms.
Suggested guidelines:
- If the table name consists of 3 words or less don't alias it.
Expand Down

0 comments on commit 39de087

Please sign in to comment.