Sequel: How to use group and count
count, group-by, ruby, sequel
Solution
DB[:albums___a].
right_join(:tracks___t, :album_id=>:id).
select_group(:a__id).
select_more{count(:t__id)}
Problem
Simply put, how can I do this query using Sequel? ``` select a.id, count(t.id) from albums a right join tracks t on t.album_id = a.id group by a.id ```