How to generate query based off from user input

Do you mean something like this?

1 Like