PuppetDB doesn't currently have any support for Puppet "environments". It needs to.
I expect that this won't be tremendously difficult on the storage side of things (although it may conceivably require changes to puppet itself to make sure the environment name is exposed to the fact & catalog termini, and to the report processor, if it's not already).
Queries don't seem like they should be all that complicated either, but I haven't really thought them all the way through.
wagner l.smith I don't have great visibility into which upcoming features / requirements this is a blocker for, but it's basically a matter of "this must be in place before anything else that presumes we support environments in PE". If you guys know of existing tickets to link to, that'd be great.