diff --git a/rails/select-value-for-sql-counts.md b/rails/select-value-for-sql-counts.md index 22eb325..f94e54d 100644 --- a/rails/select-value-for-sql-counts.md +++ b/rails/select-value-for-sql-counts.md @@ -12,3 +12,7 @@ of _whatever_. (0.6ms) select count(*) from posts where published_at is not null => 42 ``` + +Writing raw SQL for a simple query like this hardly seems like a win. +However when a count query starts to involve joins or other fanciness, I +find it much clearer to reason about the raw SQL.