I’m using a windows function to help me pagination through a list of records in the database. For example I have a list of dogs and they all have a breed associated with them. I want to show 10 dogs from each breed to my users. So that would be That will give me ~ten dogs from each breed.. What
Tag: ecto
How to write SQL for combination of AND?
Please check the attached table. I need to write a query to get documents which have both tage_id of say 32 and 26. Something like select * from doc_tags where tag_id = 32 or tag_id = 26 is not going to work as I will get both documents with 32, 26, and ( 32, 26 ). I need documents which