Hi folks.  How do I select three fields from a dataset?

SELECT country, count(id) FROM "thistable" WHERE ("status" = 'active') 
GROUP BY "country" ORDER BY "country" DESC


Currently I have:

puts DBS[:thistable].where(:status => 'active').group(:country).order(Sequel
.desc(:country)).sql


So I'm missing the *country* and *count(id) *restrictions.  I'm unclear how 
to add those.  

Any insight appreciated.  Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/7ebafdc2-39d9-44a8-907a-90428e811109%40googlegroups.com.

Reply via email to