On Monday, September 10, 2012 1:42:04 PM UTC-7, abhijit wrote:
>
> Jeremy, I did what you suggested. My query now looks like this -
>
> puts 
> db[:timesheets].select_group(:start).select_append{count(:start)}.all.to_yaml
>
> I need to extract and group based on the year on the DateTime Column 
> (:start). Will be grateful for any help.
>

   db[:timesheets].group_and_count(Sequel.extract(:year, 
:start)).all.to_yaml

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/1uoxYUb-ZS4J.
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/sequel-talk?hl=en.

Reply via email to