I have two tables with a 1-M connection and have not been able to correctly convert the following SQL into a caml/spQuery I want every value in table A once no matter what & table B divided into two groups so I can count each group.
SELECT ID,Title,Count(Fav) as Favorite,Count(nfav) as Dislike FROM TableA JOIN (SELECT * FROM TableB WHERE boolValField = 1) Fav on Fav.GroupId = TableA.ID JOIN (SELECT * FROM TableB WHERE boolValField = 0) nfav on nfav.GroupId = TableA.ID
I have been trying to follow http://msdn.microsoft.com/en-us/library/ee539975.aspx to join the tables->project viewfields->get projected columns but with no success