Ok, so this is the best time to start learning SQL, here's a good
start -> http://oreilly.com/catalog/9780596526849/

Here's how the query would look like:

SELECT departure, COUNT(*) AS departures_count FROM bookings GROUP BY departure

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)



On Wed, Feb 25, 2009 at 1:32 PM, Remco Swoany
<[email protected]> wrote:
>
> Maurício Linhares wrote:
>> Why don't you do it at the database with an order by?
>>
>> -
>> Maurício Linhares
>> http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
>> (en)
>>
>>
>>
>> On Wed, Feb 25, 2009 at 1:04 PM, Remco Swoany
>
> hmm...i don't now how to count the values through the order_by condition
> (yep..i am newbie)
>
> grtz..remco
> --
> 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]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to