Dynamic group based on group membership

I created a feature-request for the ability to use custom-SQL also for dynamic groups: Allow custom SQL-queries also in dynamic groups
I believe this could be very handy for a lot of other usecases, too.