Query Selection plugin can be used for creating layers' definition queries based on the selection inside these layers
Plugin Tags