Pivot tables or crosstab queries in HTSQL
<p>I've been looking into HTSQL to solve some ad-hoc query requirements for a client's admin system (managing holiday trips, passengers, etc).</p>

<p>Is HTSQL able produce pivot tables, or crosstab queries (as I think they are sometimes called)?</p>

<p>For example:
Count of Passengers by trip (rows) and charity supported (columns)</p>

<p>Here's example of producing pivot tables with Python:
<a href="http://stackoverflow.com/questions/5958415/pivoting-data-and-complex-annotations-in-django-orm">Pivoting data and complex annotations in Django ORM</a></p>

<p>There is some mention of pivot tables and HTSQL here:</p>

<ul>
<li><a href="http://clarkevans.com/tmp/spec.html" rel="nofollow">http://clarkevans.com/tmp/spec.html</a></li>
<li><a href="https://docs.rexdb.com/manuals/rexdb/htsql/chart.html" rel="nofollow">https://docs.rexdb.com/manuals/rexdb/htsql/chart.html</a></li>
</ul>

<p>...but none of these seem to work in my version of HTSQL (2.3.0).</p>
