Template:Query page/sandbox
Originally posted on Twitter and on Mastodon.
# people who won an Emmy, Grammy, Oscar, and Tony Award (“EGOT”)
# (may include non-competitive awards)
SELECT ?item ?itemLabel WITH {
SELECT DISTINCT ?item WHERE {
?item wdt:P31 wd:Q5;
p:P166/ps:P166/(wdt:P31|wdt:P279)* wd:Q123737, wd:Q41254, wd:Q19020, wd:Q191874.
}
} AS %results WHERE {
INCLUDE %results.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}