A template/starter for getting jQuery query builder running, because it's a bit of a faff.
This example simply gets the query builder set up, with a button that when clicked, fetches the rules and displays them in a textarea. In your project, you are likely to want to change this to perform either a form submission, or an ajax request, with the rules being translated by the backend into an SQL query.