Getting my feet wet on CAML. I was able to get a query that shows a count for a list. Now I need to do count based on multiple information.
Dog
Dog
Cat
Cat
Cat
fish
fish
fish
fish
Loops through and creates the following:
Dog: 2
Cat: 3
Fish: 4
So how would the Query look look? I'm thinking the below but this looks too cumbersome and repetative. Is there an easier way to have multiple WHERE clauses?
var dog = "<View><Query><Where><Eq><FieldRef Name='Pet' /><Value Type='Text'>Dog</Value></Eq></Where></Query><RowLimit>0</RowLimit></View>";
var cat = "<View><Query><Where><Eq><FieldRef Name='Pet' /><Value Type='Text'>Cat</Value></Eq></Where></Query><RowLimit>0</RowLimit></View>";
var fish= "<View><Query><Where><Eq><FieldRef Name='Pet' /><Value Type='Text'>fish</Value></Eq></Where></Query><RowLimit>0</RowLimit></View>";