User:I.love.marzipan/sandbox

SELECT distinct ?person ?occupation ?birthyear (COUNT(DISTINCT ?article) AS ?linkcount) WHERE {
 * 1) People of a given occupation ranked by sitelink that also includes "year of birth" and other occupations

{?s wdt:P106 wd:Q482980 .} ?s wdt:P106 ?occ. ?s wdt:P569 ?birthyear. ?article schema:about ?s. FILTER (STRBEFORE(str(?article), ".wikipedia.org/")). ?article schema:inLanguage ?lang. OPTIONAL { ?s rdfs:label ?person filter (lang(?person) = "en"). } OPTIONAL { ?occ rdfs:label ?occupation filter (lang(?occupation) = "en"). } } GROUP BY ?person ?birthyear ?occupation ?linkcount HAVING (?linkcount > 25) ORDER BY DESC(?linkcount)

SELECT distinct ?name ?occupation ?dob ?linkcount WHERE { ?s wdt:P106 wd:Q36180. ?s wdt:P106 ?occ. ?s wdt:P569 ?dob. ?s wikibase:sitelinks ?linkcount. FILTER (?linkcount >= 20). OPTIONAL { ?s rdfs:label ?name filter (lang(?name) = "en"). } OPTIONAL { ?occ rdfs:label ?occupation filter (lang(?occupation) = "en"). } } GROUP BY ?name ?occupation ?dob ?linkcount ORDER BY DESC(?linkcount)
 * 1) People of a given occupation ranked by sitelink that also includes "year of birth" and other occupations

SELECT distinct ?name ?occupation ?dob (COUNT(DISTINCT ?article) AS ?linkcount) WHERE { ?s wdt:P106 wd:Q482980. ?s wdt:P106 ?occ. ?s wdt:P569 ?dob. ?s wikibase:sitelinks ?sitecount. FILTER (?sitecount >= 20). ?article schema:about ?s. FILTER (STRBEFORE(str(?article), ".wikipedia.org/")). ?article schema:inLanguage ?lang. OPTIONAL { ?s rdfs:label ?name filter (lang(?name) = "en"). } OPTIONAL { ?occ rdfs:label ?occupation filter (lang(?occupation) = "en"). } } GROUP BY ?name ?occupation ?dob ?linkcount ORDER BY DESC(?linkcount)
 * 1) People of a given occupation ranked by wikipedia pages that also includes "year of birth" and other occupations

SELECT distinct ?name ?dob (COUNT(DISTINCT ?article) AS ?linkcount) WHERE {
 * 1) People of a given occupation ranked by wikipedia pages that also includes "year of birth"

?s wdt:P106 wd:Q482980. ?s wdt:P569 ?dob. ?s wikibase:sitelinks ?sitecount. FILTER (?sitecount >= 20). ?article schema:about ?s. FILTER (STRBEFORE(str(?article), ".wikipedia.org/")). ?article schema:inLanguage ?lang. OPTIONAL { ?s rdfs:label ?name filter (lang(?name) = "en"). } } GROUP BY ?name ?dob ?linkcount HAVING (?linkcount >= 20) ORDER BY DESC(?linkcount)