There should be a better way: ~~~ zcat wikidata-20180129-publications.ndjson.gz | head -5 | jq -r '.claims|keys[]' | sort | uniq -c ~~~