title: Can I perform this Android query with ContentResolver.query()? (LEFT JOIN and CASE)
body: <p>I am looking to perform the following query (in pseudo-code) on Android: </p>
  
  <pre><code>SELECT C.ID, C.NAME, CASE ISNULL(G.GROUPID,0) = 0 THEN 0 ELSE 1 END INGROUP
  FROM CONTACTS C 
  LEFT JOIN GROUPMEMBERSHIP G ON G.CONTACTID = C.ID AND G.GROUPID = ?
  </code></pre>
  
  <p>I am looking to select the ID and Name of ALL contacts in the system address book, via the default Contacts ContentProvider, along with a 
  0/1 field indicating whether the contact is a member of group <code>?</code> . </p>
  
  <p>I could of course get all contacts easily enough, then loop through and query the membership separately easy enough in my Adapter class, but I'd imagine performing the two queries as one outer joined query would yield much better performance.</p>
  
  <p>Can I do this with the standard high-level string-projection and <code>ContentResolver.query()</code> method? Or would this kind of query require digging into more direct SQL execution?</p>