What are the (good/functional/not ugly) JavaScript/interface libraries for controlling the development of custom boolean style queries, like the Google Statistics Advanced Segment interface?

Essentially, an engaged interface for query building that may be designed to connect with a custom query builder around the after sales (during my situation, MySQL, however it need not be database specific).

I have looked around, and haven't found anything useful or functional.

Google Analytics Query Builder

I discovered this around the Elastic Search forum, that's much like yours. A flexible search js client library is recommended : http://elasticsearch-users.115913.n3.nabble.com/javascript-query-builder-td1860558.html .

ExtJS includes a Query Builder extension for their Power grid control: http://www.developerextensions.com/index.php/extjs-grid-query-builder (search for the hyperlink over the table that states Query Builder).

I additionally found this, "Active Query Builder": http://aspquerybuilder.net/default.aspx The feature list is : http://www.activequerybuilder.com/featurematrix.html?show=asp . This is an compensated ASP.Internet ingredient that uses jQuery. It's pretty robust and might be a lot more than you're searching for as well as might be suitable for your framework (you did not specify), however it does look pretty awesome.

More ASP.Internet-based query contractors are linked from : Web based visual query builder.