Datalog
https://en.wikipedia.org/wiki/Datalog , it’s a prolog “subset” and is a lot like SQL in the “query by way of a serious of desired parameters reducing the result set” and also not at all handcuffed to the relational paradigm… so its basically relevant as a query language anywhere you have data… relational db, graph db, document db. Datalog doesn’t care.
For anyone with a python background, you can see a good example of (and experiment with) using Datalog style “logic programming” to query existing SQL databases, by checking out the pyDatalog package https://sites.google.com/site/pydatalog/ … keep in mind the level of abstraction in this library, it’s a great place to get familiar with what you could get from Datalog, but working with a database that natively supported Datalog, and had a Datalog query compiler/optimiser would be even more powerful.