You're setting up a new system, and you'd like to implement some
system-wide aliases for people using the Bourne Again SHell,
bash. The problem is you just can't remember the
name of the system-wide initialization file used by
bash, or where it resides:

# rpm -qcf /bin/bash/etc/bashrc#

Rather than spending time trying to hunt down the file, RPM finds it
for you in seconds.

Looking at bash's information, we see that it
belongs to the group "Shells". You're not sure what other shell
packages are installed on your system. If you can find other packages
in the "Shells" group, you'll have found the other installed shells:

Let's say that you're running low on disk space, and you'd like to see
what packages you have installed, along with the amount of space each
package takes up. You'd also like to see the largest packages first,
so you can get back as much disk space as possible:

Notes

Did you see this example and say to yourself, "Hey, they could've
used the -g option to query for that group directly"? If you did,
you've been paying attention. This is a more general way of
searching the RPM database for information: we just happened to
search by group in this example.