Hi, Why the data is redundant, ids there any relation behind that.
Mercedes CL63 why in two times is there any factor to distinguish in between than type and Brand? On Tue, Nov 9, 2010 at 5:56 PM, John N. <[email protected]> wrote: > Hello everyone, > > Let's say I have the following set of data in my database table: > > Cars table > > ------------------------------------- > [Brand] [Type] > Mercedes CL63 > BMW M3 > Mercedes CL63 > Audi RS4 > BMW M3 > BMW M3 > ------------------------------------- > > I would like to know how many cartypes I have of a particular brand. > So in this case I would expect an output something like: > > 2x Mercedes CL63 > 3x BMW M3 > 1x Audi RS4 > > How can I generate such an output? I have really no clue how to start. > Suggestions, tips that can pull me in the right direction are welcome. > > Thanks a bunch. > > John > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks & Regards, MuraliDharaRao.T +91-9642234646 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

