Say I have a model Animal, which has a string 'type', and a time 'birthday'.

I want to get a list of only birthday times where there's both a type 'dog' 
and a type 'cat' with birthdays at the time. Is there an optimized way to 
do this using a single Sequel command?

Direct example of data:

ID 1 - Type "Dog" - Birthday "1-31-18"

ID 2 - Type "Dog" - Birthday "2-31-18"

ID 3 - Type "Cat" - Birthday "2-31-18"

ID 4 - Type "Dog" - Birthday "3-31-18"

ID 5 - Type "Cat" - Birthday "4-31-18"



I'd want to return a list including ID's 2 and 3 only.

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to