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.
This is the equivalent of creating a pivot table in Microsoft Excel and selecting the 'show items with no data' option.
Here is the current code:
=query(Memberships!A:P,"SELECT E,COUNT(H) where J >=1 group by E PIVOT B")
What should the code be to produce the result that I want?
I could use either a query statement, or the Google Sheets pivot functionality if it has a way to do this.