From 24fb4030b01f6b98e5b3644e17a940956a0c1fd3 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sat, 9 May 2015 11:45:47 -0500 Subject: [PATCH] Add sql tags to the code blocks. --- postgres/word-count-for-a-column.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/word-count-for-a-column.md b/postgres/word-count-for-a-column.md index 11d0d9f..b38c41d 100644 --- a/postgres/word-count-for-a-column.md +++ b/postgres/word-count-for-a-column.md @@ -2,7 +2,7 @@ Assuming I have a database with a posts table: -``` +```sql > select * from posts where id = 1; id | title | content ----+----------+------------------------------------ @@ -11,7 +11,7 @@ Assuming I have a database with a posts table: I can compute the word count of the content of a given post like so: -``` +```sql > select sum(array_length(regexp_split_to_array(content, '\s+'), 1)) from posts where id = 1; sum -----