Not so abstract, really...
"Query by Example" uses this framework
User see 2-dimensional layout of schema
Can select which tables are involved, which columns (variables) appear in output (i.e., what vars are to the left of |), what conditions apply between columns, etc. etc.
This is the predominant paradigm in direct end-user query systems (e.g. Microsoft Access).