title: Google sheets pivot table: show items with no data
body: <p>I am trying to find the correct google query syntax to show a pivot column for every row element that exists in the source data, even if there is no data for it after the 'where' clause has been applied.  This way, the resultant pivot table will always be the same number of columns wide, making it possible to perform further computations on the data based on column.</p>
  
  <p>This is the equivalent of creating a pivot table in Microsoft Excel and selecting the 'show items with no data' option.</p>
  
  <p>Here is the current code:</p>
  
  <pre><code>=query(Memberships!A:P,"SELECT E,COUNT(H) where J &gt;=1 group by E PIVOT B")
  </code></pre>
  
  <p>What should the code be to produce the result that I want?</p>
  
  <p>I could use either a query statement, or the Google Sheets pivot functionality if it has a way to do this.</p>