Over a million developers have joined DZone.

Record Grouping

·

@users = User.find(
  :all, 
  :select => "MONTH(created_at) as month, YEAR(created_at) as year, COUNT(*) AS records",
  :conditions => ["admin = 0'"], 
  :group => "year, month")

<% for @user in @users %>
  <%=@user.month%>
  <%=@user.year%>
  <%=@user.records%>
<% end %>

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}