What you were attempting with a pipe works fine for me (tested in 26.1 and 25.3).
- Which version are you using?
- Does your command work outside of Emacs?
grep-use-null-device might mess up your command, by preventing the second grep from reading stdin. This would be apparent in the command line displayed in the grep buffer. If this is the issue, then hopefully you can simply disable that option via the customize interface.
Failing that, you can always filter the results after the fact with the
keep-lines commands, after toggling the read-only state with C-xC-q.
Personally I like/use the winnow library for streamlining that:
Use x to remove lines matching a pattern, or m to keep only the lines matching a pattern.