-- number of origin metadata, per domain
softwareheritage=> select (select url from metadata_authority where metadata_authority.id=authority_id), count(*) from raw_extrinsic_metadata where target > 'swh:1:ori:' and target < 'swh:1:orz' group by authority_id;
                      url                       |  count  
------------------------------------------------+---------
 https://hal.archives-ouvertes.fr/              |     817
 https://software.intel.com                     |      15
 https://doi.org/10.5201/                       |     353
 https://www.softwareheritage.org               |    2305
 https://elife.stencila.io/                     |      28
 https://www.ipol.im/                           |       1
 https://github.com                             | 5023090
 https://inria.halpreprod.archives-ouvertes.fr/ |     180
(8 rows)


-- number of origins with origin metadata, per domain
softwareheritage=> select (select url from metadata_authority where metadata_authority.id=authority_id), count(distinct target) from raw_extrinsic_metadata where target > 'swh:1:ori:' and target < 'swh:1:orz' group by authority_id;
                      url                       |  count  
------------------------------------------------+---------
 https://hal.archives-ouvertes.fr/              |     260
 https://www.softwareheritage.org               |    1145
 https://software.intel.com                     |      11
 https://www.ipol.im/                           |       1
 https://doi.org/10.5201/                       |     172
 https://inria.halpreprod.archives-ouvertes.fr/ |       2
 https://elife.stencila.io/                     |      12
 https://github.com                             | 3949342
(8 rows)