I’ve discovered one can kind of directly write SQL within Google Sheets to produce tables, summaries and pivots of your sheet’s data, using the QUERY function.

SQL like:

SELECT a, b FROM x WHERE c > 30

can be expressed in Sheets as:

=QUERY(A:C, "select A, B where C > 30")