This has been discussed a bit here: Building logical criteria (with AND , OR, etc) - but we felt the examples left a lot to be desired.
Apple (with their hidden nested rules/predicate builder) in iTunes and Mail came closest - but while it's great for putting a rule set together, I don't think it is easy to digest and easy to follow.
We experimented with how we can make a nested rules/clause set more readable and more obvious in terms of groupings and how they relate to each other.
We first tried a simple hierarchical rule set, with vertical bars to better show how the groups relate to each other and where the nestings are, rather than relying on indentation.
Then rather than using vertical bars, we tried using the indentation and displaying the actual logical relationships between each. We're not entire happy with this, because those AND and ORs seem to add a lot of visual noise.
Then we tried the best of both worlds; use of indentation and shading and the AND and ORs.
And then we took out the AND and ORs. This makes things less explicit, but we have a cleaner interface.
We are somewhat split on whether to include AND/ORs. On one hand we cannot be more explicit about the logic that will result from the rule set. On the other hand, AND and OR is not going to be intuitive to non-so-technical users.
Welcome your thoughts on that and the concepts.