I actually think SQL is not so easily composable. For me the gold standard is the Kusto query language: Tutorial: Kusto queries in Azure Data Explorer & Azure Monitor | Microsoft Docs.
Kusto is a replacement for SQL, with syntax based on the Unix command line. I think it combines the best of both.
For example, if you want to take a SQL query and adjust it to join with another table and add another column or two, you may have to make changes at several different locations. This isn’t just annoying to write—if your queries are in a version control system, it’s also annoying to review all of the lines that were changed.
In Kusto, you can do this by just adding one line at the end of the query to pipe it to the new join. That makes interactive data exploration much faster.
(Full disclosure: I work at Microsoft, and use Kusto for my job every day. I don’t work on Kusto itself, but it’s the one part of our internal tooling that I actually love.)
Edit: After reviewing your definition again, I think maybe the distinction I’m describing is not part of composability. It should probably be called something like “extensibility” instead—the ability to take an existing solution and make small modifications.
Thanks for the tip about Kusto—it actually does look quite nice.