ruby - Sequel: How to use group and count -


simply put, how can query using sequel?

select a.id, count(t.id) albums right join tracks t on t.album_id = a.id group a.id 

db[:albums___a].   right_join(:tracks___t, :album_id=>:id).   select_group(:a__id).   select_more{count(:t__id)} 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -