Skip to content

Blog

Browse through our blog page filled with updated information and the latest tips to help you achieve your goals.


SQL: Get records having min/max value per group

SQL: Get records having min/max value per group

Here's one possible solution for a case when you need to fetch a set of records unique on one (or...
How to avoid N+1 query using SQL views (materialized) in Rails application

How to avoid N+1 query using SQL views (materialized) in Rails application

Consider the way to reduce the queries when calculating the average values and find the...
Custom ordering without custom SQL with Ruby on Rails 7

Custom ordering without custom SQL with Ruby on Rails 7

The problem It's a common case for Rails applications to have enum fields on a model like: class...