1. A method for programmatically providing a user interface for forming a query, comprising: displaying a first row of query criteria; displaying a second row of query criteria, the second row being logically connected to the first row by a first Boolean connector; displaying a third row of query criteria, the third row being logically connected to the second row by a second Boolean connector; in response to a user drag-and-drop operation, nesting the third row of query criteria in the second row of query criteria; and executing a query comprising the first row, the first Boolean connector, and the nested second row and third row including the second Boolean connector.