Group first by , then by
records where
:
and
: