{ "cells": [ { "cell_type": "code", "execution_count": 32, "metadata": { "scrolled": false }, "outputs": [], "source": [ "df = spark.read.parquet('/wmf/data/event/wdqs_external_sparql_query/')" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [], "source": [ "from pyspark.sql.functions import col\n", "\n", "df_selected = (df.where(\"(datacenter='eqiad' or datacenter='codfw') AND year='2020' AND month = 11 and day = 1\")\n", " .cache()\n", ")\n", "\n", "df_timedout = df_selected.filter(col('http.status_code') == 500).filter(col('query_time') > 60000)" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", "|query |user_agent_map |\n", "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?itemLabel ?stateLabel ?start_time ?cases ?cases_time ?recs ?recs_time ?deaths ?deaths_time ?tests ?tests_time\n", "WITH {\n", " SELECT ?item ?dist ?state ?cases ?cases_time {\n", " wd:Q84055514 wdt:P527 ?item. ?item wdt:P276 ?state.\n", " OPTIONAL { ?item p:P1603 ?casestmt. ?casestmt ps:P1603 ?cases. OPTIONAL { ?casestmt pq:P585 ?cases_time } }\n", " FILTER NOT EXISTS { ?item p:P1603/pq:P585 ?cases_time_ . FILTER(?cases_time_ > ?cases_time) }\n", " }\n", "}\n", "AS %cases\n", "WITH {\n", " SELECT ?item ?deaths ?deaths_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P1120 ?deathstmt. ?deathstmt ps:P1120 ?deaths. OPTIONAL { ?deathstmt pq:P585 ?deaths_time } }\n", " FILTER NOT EXISTS { ?item p:P1120/pq:P585 ?deaths_time_ . FILTER(?deaths_time_ > ?deaths_time) }\n", " }\n", "}\n", "AS %deaths\n", "WITH {\n", " SELECT ?item ?recs ?recs_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8010 ?recstmt. ?recstmt ps:P8010 ?recs. OPTIONAL { ?recstmt pq:P585 ?recs_time } }\n", " FILTER NOT EXISTS { ?item p:P8010/pq:P585 ?recs_time_ . FILTER(?recs_time_ > ?recs_time) }\n", " }\n", "}\n", "AS %recs\n", "WITH {\n", " SELECT ?item ?tests ?tests_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8011 ?testmt. ?testmt ps:P8011 ?tests. OPTIONAL { ?testmt pq:P585 ?tests_time } }\n", " FILTER NOT EXISTS { ?item p:P8011/pq:P585 ?tests_time_ . FILTER(?tests_time_ > ?tests_time) }\n", " }\n", "}\n", "AS %tests\n", "WHERE {\n", " INCLUDE %cases. INCLUDE %deaths. INCLUDE %recs. INCLUDE %tests.\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", "}\n", "ORDER BY (?stateLabel) |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 180000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?itemLabel ?stateLabel ?start_time ?cases ?cases_time ?recs ?recs_time ?deaths ?deaths_time ?tests ?tests_time\n", "WITH {\n", " SELECT ?item ?dist ?state ?cases ?cases_time {\n", " wd:Q84055514 wdt:P527 ?item. ?item wdt:P276 ?state.\n", " OPTIONAL { ?item p:P1603 ?casestmt. ?casestmt ps:P1603 ?cases. OPTIONAL { ?casestmt pq:P585 ?cases_time } }\n", " FILTER NOT EXISTS { ?item p:P1603/pq:P585 ?cases_time_ . FILTER(?cases_time_ > ?cases_time) }\n", " }\n", "}\n", "AS %cases\n", "WITH {\n", " SELECT ?item ?deaths ?deaths_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P1120 ?deathstmt. ?deathstmt ps:P1120 ?deaths. OPTIONAL { ?deathstmt pq:P585 ?deaths_time } }\n", " FILTER NOT EXISTS { ?item p:P1120/pq:P585 ?deaths_time_ . FILTER(?deaths_time_ > ?deaths_time) }\n", " }\n", "}\n", "AS %deaths\n", "WITH {\n", " SELECT ?item ?recs ?recs_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8010 ?recstmt. ?recstmt ps:P8010 ?recs. OPTIONAL { ?recstmt pq:P585 ?recs_time } }\n", " FILTER NOT EXISTS { ?item p:P8010/pq:P585 ?recs_time_ . FILTER(?recs_time_ > ?recs_time) }\n", " }\n", "}\n", "AS %recs\n", "WITH {\n", " SELECT ?item ?tests ?tests_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8011 ?testmt. ?testmt ps:P8011 ?tests. OPTIONAL { ?testmt pq:P585 ?tests_time } }\n", " FILTER NOT EXISTS { ?item p:P8011/pq:P585 ?tests_time_ . FILTER(?tests_time_ > ?tests_time) }\n", " }\n", "}\n", "AS %tests\n", "WHERE {\n", " INCLUDE %cases. INCLUDE %deaths. INCLUDE %recs. INCLUDE %tests.\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", "}\n", "ORDER BY (?stateLabel) |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|select ?simbad ?id { ?id ps:P3083 ?simbad } LIMIT 10000 OFFSET 7600000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> simbadbot, device_family -> Spider, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt0062622\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P18 ?value . FILTER( REGEX(STR(?value), '_') = true)} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?id ?idLabel (if(?class = wd:Q41318677, '#F00', '#AAA') as ?fill)\n", "(concat('[[', substr(str(?link),31,500), ']]') as ?title)\n", "(concat(if(?class = wd:Q41318677, 'Patrimonio UNESCO', ''), '\\n', '[[File:', substr(str(?img), 52, 500), '|200px]]') as \n", "?description)\n", "WHERE\n", "{\n", " ?id wdt:P361 ?class.\n", " FILTER (?class = wd:Q51279768 || ?class = wd:Q41318677).\n", " OPTIONAL {?id wdt:P18 ?img.}\n", "\n", " \t?link schema:about ?id .\n", " ?link schema:inLanguage 'it' .\n", "\tSERVICE wikibase:label { bd:serviceParam wikibase:language 'it' }\n", "} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt0062622\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?itemLabel ?stateLabel ?start_time ?cases ?cases_time ?recs ?recs_time ?deaths ?deaths_time ?tests ?tests_time\n", "WITH {\n", " SELECT ?item ?dist ?state ?cases ?cases_time {\n", " wd:Q84055514 wdt:P527 ?item. ?item wdt:P276 ?state.\n", " OPTIONAL { ?item p:P1603 ?casestmt. ?casestmt ps:P1603 ?cases. OPTIONAL { ?casestmt pq:P585 ?cases_time } }\n", " FILTER NOT EXISTS { ?item p:P1603/pq:P585 ?cases_time_ . FILTER(?cases_time_ > ?cases_time) }\n", " }\n", "}\n", "AS %cases\n", "WITH {\n", " SELECT ?item ?deaths ?deaths_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P1120 ?deathstmt. ?deathstmt ps:P1120 ?deaths. OPTIONAL { ?deathstmt pq:P585 ?deaths_time } }\n", " FILTER NOT EXISTS { ?item p:P1120/pq:P585 ?deaths_time_ . FILTER(?deaths_time_ > ?deaths_time) }\n", " }\n", "}\n", "AS %deaths\n", "WITH {\n", " SELECT ?item ?recs ?recs_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8010 ?recstmt. ?recstmt ps:P8010 ?recs. OPTIONAL { ?recstmt pq:P585 ?recs_time } }\n", " FILTER NOT EXISTS { ?item p:P8010/pq:P585 ?recs_time_ . FILTER(?recs_time_ > ?recs_time) }\n", " }\n", "}\n", "AS %recs\n", "WITH {\n", " SELECT ?item ?tests ?tests_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8011 ?testmt. ?testmt ps:P8011 ?tests. OPTIONAL { ?testmt pq:P585 ?tests_time } }\n", " FILTER NOT EXISTS { ?item p:P8011/pq:P585 ?tests_time_ . FILTER(?tests_time_ > ?tests_time) }\n", " }\n", "}\n", "AS %tests\n", "WHERE {\n", " INCLUDE %cases. INCLUDE %deaths. INCLUDE %recs. INCLUDE %tests.\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", "}\n", "ORDER BY (?stateLabel) |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?itemLabel ?stateLabel ?start_time ?cases ?cases_time ?recs ?recs_time ?deaths ?deaths_time ?tests ?tests_time\n", "WITH {\n", " SELECT ?item ?dist ?state ?cases ?cases_time {\n", " wd:Q84055514 wdt:P527 ?item. ?item wdt:P276 ?state.\n", " OPTIONAL { ?item p:P1603 ?casestmt. ?casestmt ps:P1603 ?cases. OPTIONAL { ?casestmt pq:P585 ?cases_time } }\n", " FILTER NOT EXISTS { ?item p:P1603/pq:P585 ?cases_time_ . FILTER(?cases_time_ > ?cases_time) }\n", " }\n", "}\n", "AS %cases\n", "WITH {\n", " SELECT ?item ?deaths ?deaths_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P1120 ?deathstmt. ?deathstmt ps:P1120 ?deaths. OPTIONAL { ?deathstmt pq:P585 ?deaths_time } }\n", " FILTER NOT EXISTS { ?item p:P1120/pq:P585 ?deaths_time_ . FILTER(?deaths_time_ > ?deaths_time) }\n", " }\n", "}\n", "AS %deaths\n", "WITH {\n", " SELECT ?item ?recs ?recs_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8010 ?recstmt. ?recstmt ps:P8010 ?recs. OPTIONAL { ?recstmt pq:P585 ?recs_time } }\n", " FILTER NOT EXISTS { ?item p:P8010/pq:P585 ?recs_time_ . FILTER(?recs_time_ > ?recs_time) }\n", " }\n", "}\n", "AS %recs\n", "WITH {\n", " SELECT ?item ?tests ?tests_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8011 ?testmt. ?testmt ps:P8011 ?tests. OPTIONAL { ?testmt pq:P585 ?tests_time } }\n", " FILTER NOT EXISTS { ?item p:P8011/pq:P585 ?tests_time_ . FILTER(?tests_time_ > ?tests_time) }\n", " }\n", "}\n", "AS %tests\n", "WHERE {\n", " INCLUDE %cases. INCLUDE %deaths. INCLUDE %recs. INCLUDE %tests.\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", "}\n", "ORDER BY (?stateLabel) |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|PREFIX wdt: \n", "PREFIX wd: \n", "PREFIX wikibase: \n", "PREFIX p: \n", "PREFIX v: \n", "PREFIX q: \n", "PREFIX rdfs: \n", "PREFIX schema: \n", "PREFIX psv: \n", "SELECT DISTINCT ?item WHERE {?item wdt:P31 wd:Q5 . ?item wdt:P27 ?sub1 . ?sub1 (wdt:P279|wdt:P131)* wd:Q142 . ?item wdt:P106 ?sub2 . ?sub2 (wdt:P279|wdt:P131)* wd:Q1028181} LIMIT 500 |[os_family -> Mac OS X, os_major -> 10, os_minor -> 15, browser_major -> 14, browser_family -> Safari, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P18 ?value . FILTER( REGEX(STR(?value), '^http://commons\\\\.wikimedia\\\\.org/wiki/Special:FilePath/[a-z]') = true)} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 180000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q5; wdt:P17 []; wdt:P569 ?birth . FILTER(YEAR(?birth) > 1850) } |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|select ?simbad ?id { ?id ps:P3083 ?simbad } LIMIT 10000 OFFSET 7590000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> simbadbot, device_family -> Spider, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?itemLabel ?stateLabel ?start_time ?cases ?cases_time ?recs ?recs_time ?deaths ?deaths_time ?tests ?tests_time\n", "WITH {\n", " SELECT ?item ?dist ?state ?cases ?cases_time {\n", " wd:Q84055514 wdt:P527 ?item. ?item wdt:P276 ?state.\n", " OPTIONAL { ?item p:P1603 ?casestmt. ?casestmt ps:P1603 ?cases. OPTIONAL { ?casestmt pq:P585 ?cases_time } }\n", " FILTER NOT EXISTS { ?item p:P1603/pq:P585 ?cases_time_ . FILTER(?cases_time_ > ?cases_time) }\n", " }\n", "}\n", "AS %cases\n", "WITH {\n", " SELECT ?item ?deaths ?deaths_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P1120 ?deathstmt. ?deathstmt ps:P1120 ?deaths. OPTIONAL { ?deathstmt pq:P585 ?deaths_time } }\n", " FILTER NOT EXISTS { ?item p:P1120/pq:P585 ?deaths_time_ . FILTER(?deaths_time_ > ?deaths_time) }\n", " }\n", "}\n", "AS %deaths\n", "WITH {\n", " SELECT ?item ?recs ?recs_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8010 ?recstmt. ?recstmt ps:P8010 ?recs. OPTIONAL { ?recstmt pq:P585 ?recs_time } }\n", " FILTER NOT EXISTS { ?item p:P8010/pq:P585 ?recs_time_ . FILTER(?recs_time_ > ?recs_time) }\n", " }\n", "}\n", "AS %recs\n", "WITH {\n", " SELECT ?item ?tests ?tests_time {\n", " wd:Q84055514 wdt:P527 ?item.\n", " OPTIONAL { ?item p:P8011 ?testmt. ?testmt ps:P8011 ?tests. OPTIONAL { ?testmt pq:P585 ?tests_time } }\n", " FILTER NOT EXISTS { ?item p:P8011/pq:P585 ?tests_time_ . FILTER(?tests_time_ > ?tests_time) }\n", " }\n", "}\n", "AS %tests\n", "WHERE {\n", " INCLUDE %cases. INCLUDE %deaths. INCLUDE %recs. INCLUDE %tests.\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", "}\n", "ORDER BY (?stateLabel) |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt0062622\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?item WHERE {?item wdt:P31 ?value . FILTER ( ?value IN (wd:Q215627, wd:Q467, wd:Q8441, wd:Q171283))} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "#defaultView:Table\n", "SELECT ?count ?cited_work ?cited_workLabel\n", "WITH {\n", " SELECT (count(?work) as ?count) ?cited_work WHERE {\n", " { ?work wdt:P921/wdt:P31*/wdt:P279* wd:Q3338704 . }\n", " union { ?work wdt:P921/wdt:P361+ wd:Q3338704 . }\n", " union { ?work wdt:P921/wdt:P1269+ wd:Q3338704 . }\n", " ?work wdt:P2860 ?cited_work .\n", " }\n", " GROUP BY ?cited_work\n", "} AS %result\n", "WHERE {\n", " INCLUDE %result\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,da,de,es,fr,jp,nl,no,ru,sv,zh\" . } \n", "}\n", "ORDER BY DESC(?count)\n", "LIMIT 200\n", " |[os_family -> Windows, os_major -> 10, os_minor -> -, browser_major -> 49, browser_family -> Chrome, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item { ?item wdt:P25 ?item2 . MINUS { ?item2 p:P40/ps:P40/owl:sameAs? ?item } . ?item wdt:P22 [ p:P26/ps:P26 ?item2 ]} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "| PREFIX xsd: \n", " PREFIX schema: \n", "\n", " SELECT DISTINCT ?item ?IMDb_ID ?Freebase_ID ?sitelink ?publication_dateLabel ?genreLabel ?country_of_originLabel ?original_language_of_workLabel ?number_of_seasons ?number_of_episodes ?start_time WHERE {\n", " ?item wdt:P31/wdt:P279* wd:Q11424.\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", " OPTIONAL { ?item wdt:P345 ?IMDb_ID. }\n", " OPTIONAL { ?item wdt:P646 ?Freebase_ID. }\n", " ?sitelink schema:about ?item.\n", " ?sitelink schema:inLanguage \"en\".\n", " ?sitelink schema:isPartOf .\n", " OPTIONAL { ?item wdt:P577 ?publication_date. }\n", " OPTIONAL { ?item wdt:P136 ?genre. }\n", " OPTIONAL { ?item wdt:P495 ?country_of_origin. }\n", " OPTIONAL { ?item wdt:P364 ?original_language_of_work. }\n", " OPTIONAL { ?item wdt:P2437 ?number_of_seasons. }\n", " OPTIONAL { ?item wdt:P1113 ?number_of_episodes. }\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " FILTER(BOUND(?IMDb_ID)) ## filter anything that has an IMDB\n", " # FILTER(BOUND(?publication_date))\n", " FILTER((?publication_date >= \"2000-07-01T00:00:00Z\"^^xsd:dateTime) && (?publication_date <= \"2000-12-31T00:00:00Z\"^^xsd:dateTime)||(?start_time >= \"2000-07-01T00:00:00Z\"^^xsd:dateTime) && (?start_time <= \"2000-12-31T00:00:00Z\"^^xsd:dateTime))\n", " }\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?q (count(?article) as ?count) WHERE {\n", " SELECT ?q ?article WHERE {\n", " VALUES ?q { } .\n", " ?article wdt:P50 ?q . }\n", " } group by ?q\n", "#TOOL: legacy code |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|select ?simbad ?id { ?id ps:P3083 ?simbad } LIMIT 10000 OFFSET 7770000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> simbadbot, device_family -> Spider, wmf_app_version -> -] |\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt2488496\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt2488496\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "PREFIX q: \n", "SELECT DISTINCT ?s WHERE {\n", " BIND (p:P348 as ?prop)\n", " ?s ?prop ?st .\n", "# One claim with point-in-time\n", " ?st q:P585 ?t .\n", "# Normal rank\n", " ?st wikibase:rank wikibase:NormalRank.\n", " ?st a wikibase:BestRank .\n", "# Another claim\n", " ?s ?prop ?st2 .\n", " FILTER(?st2 != ?st)\n", "# with a point-in-time time\n", " ?st2 q:P585 ?t3 .\n", "# and it's not a dead person\n", " OPTIONAL { ?s wdt:P570 ?d }\n", " FILTER(!bound(?d))\n", "# and not abolished\n", " OPTIONAL { ?s wdt:P576 ?ab }\n", " FILTER(!bound(?ab))\n", "# st2 is normal rank and normal is best\n", "# ?st2 wikibase:rank wikibase:NormalRank.\n", "# ?st2 a wikibase:BestRank .\n", " \n", "} LIMIT 20\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> prefer Pywikibot, device_family -> Spider, wmf_app_version -> -] |\n", "|SELECT ?q (count(?article) as ?count) WHERE {\n", " SELECT ?q ?article WHERE {\n", " VALUES ?q { } .\n", " ?article wdt:P50 ?q . }\n", " } group by ?q\n", "#TOOL: legacy code |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?item { ?item wdt:P22 ?item2 . MINUS { ?item2 p:P40/ps:P40/owl:sameAs? ?item } . ?item wdt:P25 [ p:P26/ps:P26 ?item2 ]} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 180000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?id ?idLabel (if(?class = wd:Q41318677, '#F00', '#AAA') as ?fill)\n", "(concat('[[', substr(str(?link),31,500), ']]') as ?title)\n", "(concat(if(?class = wd:Q41318677, 'Patrimonio UNESCO', ''), '\\n', '[[File:', substr(str(?img), 52, 500), '|200px]]') as \n", "?description)\n", "WHERE\n", "{\n", " ?id wdt:P361 ?class.\n", " FILTER (?class = wd:Q51279768 || ?class = wd:Q41318677).\n", " OPTIONAL {?id wdt:P18 ?img.}\n", "\n", " \t?link schema:about ?id .\n", " ?link schema:inLanguage 'it' .\n", "\tSERVICE wikibase:label { bd:serviceParam wikibase:language 'it' }\n", "} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT\n", " ?entity ?label_en ?label_pt ?originalTitle\n", " \n", " (group_concat(distinct(?instanceOfLabel);separator=\"|\") as ?instanceOf_list)\n", " (group_concat(distinct(?subject_label);separator=\"|\") as ?subject_list)\n", " (group_concat(distinct(?genre_label);separator=\"|\") as ?genre_list)\n", " (group_concat(distinct(?country_label);separator=\"|\") as ?country_list)\n", " (group_concat(distinct(?language_label);separator=\"|\") as ?language_list)\n", "\n", " (group_concat(distinct(?productionStudio_label);separator=\"|\") as ?productionStudio_list)\n", " (group_concat(distinct(?distributor_label);separator=\"|\") as ?distributor_list)\n", "\n", " (group_concat(distinct(?narrativeLocation );separator=\"|\") as ?narrativeLocation_id_list)\n", " (group_concat(distinct(?narrativeLocation_pt);separator=\"|\") as ?narrativeLocation_pt_list)\n", " (group_concat(distinct(?narrativeLocation_en);separator=\"|\") as ?narrativeLocation_en_list)\n", "\n", " (group_concat(distinct(?alt_en);separator=\"|\") as ?alt_en_list)\n", " (group_concat(distinct(?alt_pt);separator=\"|\") as ?alt_pt_list)\n", " ( min(?pubDate) as ?min_pub_date )\n", "\n", " (group_concat(distinct(?officialWebSite );separator=\"|\") as ?officialWebSite_list)\n", "\n", " (max(?duration) as ?durationLabel)\n", " ?colorLabel \n", " (max(?boxOffice) as ?boxOfficeLabel)\n", " (max(?cost) as ?costLabel)\n", " ?universeLabel\n", "\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", " (group_concat(distinct(?rottenTomatoesId);separator=\"|\") as ?rottenTomatoesId_list)\n", " (group_concat(distinct(?netflixId);separator=\"|\") as ?netflixId_list)\n", "\n", "WHERE\n", "{\n", " ?entity wdt:P345 \"tt2488496\" .\n", "\n", " OPTIONAL { ?entity rdfs:label ?label_en . FILTER (lang(?label_en) = \"en\") . }\n", " OPTIONAL { ?entity rdfs:label ?label_pt . FILTER (lang(?label_pt) = \"pt\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_en . FILTER (lang(?alt_en ) = \"en\") . }\n", " OPTIONAL { ?entity skos:altLabel ?alt_pt . FILTER (lang(?alt_pt ) = \"pt\") . }\n", " \n", " OPTIONAL { ?entity wdt:P31 ?instanceOf . }\n", " OPTIONAL { ?entity wdt:P921 ?subject . ?subject rdfs:label ?subject_label . FILTER (lang(?subject_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P136 ?genre . ?genre rdfs:label ?genre_label . FILTER (lang(?genre_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P495 ?country . ?country rdfs:label ?country_label . FILTER (lang(?country_label ) = \"en\")}\n", " OPTIONAL { ?entity wdt:P364 ?language . ?language rdfs:label ?language_label . FILTER (lang(?language_label) = \"en\")}\n", "\n", " OPTIONAL { ?entity wdt:P577 ?pubDate }\n", " OPTIONAL { ?entity wdt:P272 ?productionStudio. ?productionStudio rdfs:label ?productionStudio_label . FILTER (lang(?productionStudio_label) = \"en\")}\n", " OPTIONAL { ?entity wdt:P750 ?distributor. ?distributor rdfs:label ?distributor_label . FILTER (lang(?distributor_label ) = \"en\")}\n", " OPTIONAL { \n", " ?entity wdt:P840 ?narrativeLocation. \n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_en . FILTER (lang(?narrativeLocation_en) = \"en\") }\n", " OPTIONAL { ?narrativeLocation rdfs:label ?narrativeLocation_pt . FILTER (lang(?narrativeLocation_pt) = \"pt\") }\n", " }\n", "\n", " OPTIONAL { ?entity wdt:P2047 ?duration }\n", " OPTIONAL { ?entity wdt:P462 ?color }\n", " OPTIONAL { ?entity wdt:P2142 ?boxOffice }\n", " OPTIONAL { ?entity wdt:P2130 ?cost }\n", " OPTIONAL { ?entity wdt:P1434 ?universe }\n", " OPTIONAL { ?entity wdt:P856 ?officialWebSite }\n", " \n", " OPTIONAL { ?entity wdt:P646 ?freebaseId }\n", " OPTIONAL { ?entity wdt:P1258 ?rottenTomatoesId }\n", " OPTIONAL { ?entity wdt:P1712 ?metacriticId }\n", " OPTIONAL { ?entity wdt:P1874 ?netflixId }\n", " OPTIONAL { ?entity wdt:P4947 ?tmdbId }\n", "\n", " OPTIONAL { ?entity wdt:P1476 ?originalTitle }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "GROUP BY \n", " ?entity ?label_en ?label_pt ?originalTitle \n", " ?colorLabel ?universeLabel\n", " ?freebaseIdLabel ?metacriticIdLabel ?tmdbIdLabel\n", "limit 2\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 0, browser_family -> NOS-Wikidata-Enricher-bot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT ?software ?softwareLabel ?versionStatement\n", " ?version ?date ?repositoryLabel ?developerLabel WHERE {\n", " ?software p:P348 ?versionStatement.\n", " \n", " OPTIONAL { ?software wdt:P275 ?license;\n", " wdt:P178 ?developer. }\n", " \n", " OPTIONAL { ?software wdt:P1324 ?repository. }\n", " \n", " # ?versionStatement wikibase:rank wikibase:PreferredRank.\n", " \n", " ?versionStatement ps:P348 ?version;\n", " pq:P577 ?date.\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", " }\n", " LIMIT 10000 OFFSET 210000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item p:P26/ps:P26 ?item2 . MINUS { ?item2 p:P26/ps:P26/owl:sameAs? ?item } . ?item2 wdt:P40/^wdt:P40 ?item; wdt:P21/wdt:P461/^wdt:P21 ?item .} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?id ?idLabel (if(?class = wd:Q41318677, '#F00', '#AAA') as ?fill)\n", "(concat('[[', substr(str(?link),31,500), ']]') as ?title)\n", "(concat(if(?class = wd:Q41318677, 'Patrimonio UNESCO', ''), '\\n', '[[File:', substr(str(?img), 52, 500), '|200px]]') as \n", "?description)\n", "WHERE\n", "{\n", " ?id wdt:P361 ?class.\n", " FILTER (?class = wd:Q51279768 || ?class = wd:Q41318677).\n", " OPTIONAL {?id wdt:P18 ?img.}\n", "\n", " \t?link schema:about ?id .\n", " ?link schema:inLanguage 'it' .\n", "\tSERVICE wikibase:label { bd:serviceParam wikibase:language 'it' }\n", "} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "PREFIX wikibase: \n", "PREFIX wd: \n", "PREFIX wdt: \n", "PREFIX rdfs: \n", "\n", "SELECT DISTINCT ?labelcat ?labelcat1 WHERE {\n", " wd:Q39546 rdfs:label ?labelcat.\n", " ?mot wdt:P31|wdt:P279*/wdt:P279? wd:Q39546 .\n", " \n", " ?mot rdfs:label ?labelmot.\n", " \n", " OPTIONAL {wd:Q39546 rdfs:label ?labelcat1.\n", " FILTER(LANG(?labelcat1) = 'af')\n", " }\n", " FILTER(LANG(?labelcat) = 'fr')\n", " FILTER(LANG(?labelmot) = 'fr')\n", "}\n", "\t\t |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT (COUNT(?entity) AS ?count) WHERE {\n", " ?entity wdt:P106 [wdt:P279/wdt:P279* wd:Q36180]; wdt:P31 wd:Q5 .\n", " MINUS { ?entity wdt:P1412 _:b28. }\n", " FILTER(EXISTS { ?entity p:P214 _:b29. })\n", "}\n", "GROUP BY ?grouping\n", "ORDER BY DESC (?count)\n", "LIMIT 10\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "PREFIX q: \n", "SELECT DISTINCT ?s WHERE {\n", " BIND (p:P348 as ?prop)\n", " ?s ?prop ?st .\n", "# One claim with point-in-time\n", " ?st q:P585 ?t .\n", "# Normal rank\n", " ?st wikibase:rank wikibase:NormalRank.\n", " ?st a wikibase:BestRank .\n", "# Another claim\n", " ?s ?prop ?st2 .\n", " FILTER(?st2 != ?st)\n", "# with a point-in-time time\n", " ?st2 q:P585 ?t3 .\n", "# and it's not a dead person\n", " OPTIONAL { ?s wdt:P570 ?d }\n", " FILTER(!bound(?d))\n", "# and not abolished\n", " OPTIONAL { ?s wdt:P576 ?ab }\n", " FILTER(!bound(?ab))\n", "# st2 is normal rank and normal is best\n", "# ?st2 wikibase:rank wikibase:NormalRank.\n", "# ?st2 a wikibase:BestRank .\n", " \n", "} LIMIT 20\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> prefer Pywikibot, device_family -> Spider, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P18 ?value . FILTER( REGEX(STR(?value), '_') = true)} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item { ?item wdt:P22 ?item2 . MINUS { ?item2 p:P40/ps:P40/owl:sameAs? ?item } . ?item wdt:P25 [ p:P26/ps:P26 ?item2 ]} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q5; wdt:P17 []; wdt:P569 ?birth . FILTER(YEAR(?birth) > 1850) } |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|\n", "SELECT ?grouping (SAMPLE(?_higher_grouping) as ?higher_grouping) (COUNT(DISTINCT ?entity) as ?count) WHERE {\n", " ?entity wdt:P31/wdt:P279* wd:Q33506; wdt:P31/wdt:P279* wd:Q811979 .\n", " ?entity wdt:P17 ?grouping .\n", " OPTIONAL { ?grouping wdt:P17/wdt:P298 ?_higher_grouping }.\n", "} GROUP BY ?grouping ?higher_grouping\n", "HAVING (?count >= 1)\n", "ORDER BY DESC(?count)\n", "LIMIT 1000\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 3, browser_family -> pages_processor Pywikibot, device_family -> Spider, wmf_app_version -> -]|\n", "|SELECT DISTINCT ?item { ?item wdt:P25 ?item2 . MINUS { ?item2 p:P40/ps:P40/owl:sameAs? ?item } . ?item wdt:P22 [ p:P26/ps:P26 ?item2 ]} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?q (count(?article) as ?count) WHERE {\n", " SELECT ?q ?article WHERE {\n", " VALUES ?q { } .\n", " ?article wdt:P50 ?q . }\n", " } group by ?q\n", "#TOOL: legacy code |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|#\n", "SELECT DISTINCT ?person ?personLabel ?photurl ?photourlLabel WHERE {\n", " ?person wdt:P106 wd:Q4439155 .\n", " ?photourl wdt:P18 ?pic.\n", " SERVICE wikibase:label {\n", " bd:serviceParam wikibase:language \"en,en\" .\n", " }\n", "} |[os_family -> Mac OS X, os_major -> 10, os_minor -> 15, browser_major -> 86, browser_family -> Chrome, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P18 ?value . FILTER( REGEX(STR(?value), '^http://commons\\\\.wikimedia\\\\.org/wiki/Special:FilePath/[a-z]') = true)} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE {?item wdt:P31 ?value . FILTER ( ?value IN (wd:Q215627, wd:Q467, wd:Q8441, wd:Q171283))} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?i ?iLabel {\n", " ?i wdt:P3083 ?id. FILTER(STRSTARTS(?id,\"CD\"))\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"bn,en\". }\n", "} |[os_family -> Windows, os_major -> 10, os_minor -> -, browser_major -> 82, browser_family -> Firefox, device_family -> Other, wmf_app_version -> -] |\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "PREFIX wikibase: \n", "PREFIX wd: \n", "PREFIX wdt: \n", "PREFIX rdfs: \n", "\n", "SELECT DISTINCT ?labelcat ?labelcat1 WHERE {\n", " wd:Q39546 rdfs:label ?labelcat.\n", " ?mot wdt:P31|wdt:P279*/wdt:P279? wd:Q39546 .\n", " \n", " ?mot rdfs:label ?labelmot.\n", " \n", " OPTIONAL {wd:Q39546 rdfs:label ?labelcat1.\n", " FILTER(LANG(?labelcat1) = 'af')\n", " }\n", " FILTER(LANG(?labelcat) = 'fr')\n", " FILTER(LANG(?labelmot) = 'fr')\n", "}\n", "\t\t |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item p:P26/ps:P26 ?item2 . MINUS { ?item2 p:P26/ps:P26/owl:sameAs? ?item } . ?item2 wdt:P40/^wdt:P40 ?item; wdt:P21/wdt:P461/^wdt:P21 ?item .} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|PREFIX schema: \n", "\tPREFIX wd: \n", "\tPREFIX wdt: \n", "\tPREFIX wikibase: \n", "\tPREFIX p: \n", "\tPREFIX ps: \n", "\tPREFIX pq: \n", "\tPREFIX rdfs: \n", "\tPREFIX bd: \n", "\n", "\t#Recent Events\n", "\tSELECT ?event ?date ?article \n", "\tWHERE\n", "\t{\n", "\t\t# find events\n", "\t\t?event wdt:P31/wdt:P279* wd:Q1190554.\n", "\t\t# with a point in time or start date\n", "\t\t?event wdt:P585 ?date.\n", "\t \n", "\t ?article schema:about ?event .\n", "\t ?article schema:isPartOf .\n", "\t \n", "\t\t# events on the same day\n", "\t\tFILTER (datatype(?date) = xsd:dateTime && month(?date) = month(now()) && day(?date) = day(now()) )\n", "\t} ORDER by DESC(?date) \n", "\t# limit to 10 results so we don't timeout\n", "\tLIMIT 5 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item { ?item wdt:P22 ?item2 . MINUS { ?item2 p:P40/ps:P40/owl:sameAs? ?item } . ?item wdt:P25 [ p:P26/ps:P26 ?item2 ]} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?date ?work ?workLabel ?topicsUrl ?topics \n", "WITH {\n", " SELECT DISTINCT ?work WHERE {\n", " ?work wdt:P921 / (wdt:P361+ | wdt:P1269+ | (wdt:P31* / wdt:P279*) ) wd:Q84263196 .\n", " }\n", "} AS %works\n", "WITH {\n", " SELECT (MAX(?dates) as ?datetime) ?work (GROUP_CONCAT(DISTINCT ?topic_label; separator=\" // \") AS ?topics) \n", " (CONCAT(\"../topics/\", GROUP_CONCAT(DISTINCT SUBSTR(STR(?topic), 32); separator=\",\")) AS ?topicsUrl) \n", " WHERE {\n", " INCLUDE %works\n", " ?work wdt:P921 ?topic . \n", " ?work wdt:P577 ?dates . \n", "\tFILTER (!isBLANK(?dates)) .\n", " ?topic rdfs:label ?topic_label . FILTER (lang(?topic_label) = 'en')\n", " }\n", " GROUP BY ?work\n", "} AS %result\n", "WHERE {\n", " INCLUDE %result\n", "\n", " # There is a problem with BC dates\n", " # BIND(xsd:date(?datetime) AS ?date)\n", " BIND(REPLACE(STR(?datetime), 'T.*', '') AS ?date)\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,da,de,es,fr,jp,nl,no,ru,sv,zh\". }\n", "}\n", "GROUP BY ?date ?work ?workLabel ?topicsUrl ?topics\n", "ORDER BY ASC(?date)\n", "LIMIT 500\n", " |[os_family -> Ubuntu, os_major -> -, os_minor -> -, browser_major -> 82, browser_family -> Firefox, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?cityLabel ?mayorLabel ?population\n", "WHERE {\n", " ?city wdt:P31/wdt:P279* wd:Q515. #?city is a city\n", "# ?city p:P6 ?st. #?st is `head of gov.' statement about ?city\n", "# ?st ps:P6 ?mayor. #?mayor is the subject of ?st\n", "# FILTER NOT EXISTS{?stat pq:P582 ?x} #?st has no end date\n", " ?mayor wdt:P21 wd:Q6581072. #?mayor is a woman\n", " ?city wdt:P1082 ?population #?city has ?population\n", " SERVICE wikibase:label {bd:serviceParam wikibase:language \"en,en\" .}\n", "}\n", "ORDER BY DESC(?population)\n", "LIMIT 10\n", " |[os_family -> Mac OS X, os_major -> 10, os_minor -> 15, browser_major -> 86, browser_family -> Chrome, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT ?date ?work ?workLabel ?topicsUrl ?topics \n", "WITH {\n", " SELECT DISTINCT ?work WHERE {\n", " ?work wdt:P921 / (wdt:P361+ | wdt:P1269+ | (wdt:P31* / wdt:P279*) ) wd:Q84263196 .\n", " }\n", "} AS %works\n", "WITH {\n", " SELECT (MAX(?dates) as ?datetime) ?work (GROUP_CONCAT(DISTINCT ?topic_label; separator=\" // \") AS ?topics) \n", " (CONCAT(\"../topics/\", GROUP_CONCAT(DISTINCT SUBSTR(STR(?topic), 32); separator=\",\")) AS ?topicsUrl) \n", " WHERE {\n", " INCLUDE %works\n", " ?work wdt:P921 ?topic . \n", " ?work wdt:P577 ?dates . \n", "\tFILTER (!isBLANK(?dates)) .\n", " ?topic rdfs:label ?topic_label . FILTER (lang(?topic_label) = 'en')\n", " }\n", " GROUP BY ?work\n", "} AS %result\n", "WHERE {\n", " INCLUDE %result\n", "\n", " # There is a problem with BC dates\n", " # BIND(xsd:date(?datetime) AS ?date)\n", " BIND(REPLACE(STR(?datetime), 'T.*', '') AS ?date)\n", " \n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en,da,de,es,fr,jp,nl,no,ru,sv,zh\". }\n", "}\n", "GROUP BY ?date ?work ?workLabel ?topicsUrl ?topics\n", "ORDER BY ASC(?date)\n", "LIMIT 500\n", " |[os_family -> Ubuntu, os_major -> -, os_minor -> -, browser_major -> 82, browser_family -> Firefox, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?pname ?o ?olabel WHERE \n", "{\n", " {\n", " wd:Q8025304 ?directClaimP ?o . # Get the truthy triples.\n", " ?p wikibase:directClaim ?directClaimP . # Find the Wikibase properties linked\n", " ?p rdfs:label ?pname . # to the truthy triples' predicates\n", " FILTER ( lang(?pname) = \"en\" ) # and their labels, in English.\n", " OPTIONAL {\n", " ?o rdfs:label ?olabel \n", " FILTER ( lang(?olabel) = \"en\" )\n", " }\n", " }\n", " UNION\n", " {\n", " wd:Q8025304 schema:description ?olabel FILTER ( lang(?olabel) = \"en\" )\n", " BIND('_description' AS ?pname)\n", " }\n", " UNION\n", " {\n", " wd:Q8025304 rdfs:label ?olabel FILTER ( lang(?olabel) = \"en\" )\n", " BIND('_name' AS ?pname)\n", " }\n", "} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", " SELECT * WHERE {\n", " ?wikidata (wdt:P106/wdt:P279*) wd:Q36834.\n", " OPTIONAL { ?wikidata wdt:P1477 ?birthname. }\n", " OPTIONAL { ?wikidata wdt:P569 ?dob. }\n", " OPTIONAL { ?wikidata wdt:P19 ?place_of_birth. }\n", " OPTIONAL { ?wikidata wdt:P21 ?gender. }\n", " OPTIONAL { ?wikidata wdt:P1828 ?ipi. }\n", " OPTIONAL { ?wikidata wdt:P1902 ?spotify. }\n", " OPTIONAL { ?wikidata wdt:P1953 ?discogs. }\n", " OPTIONAL { ?wikidata wdt:P2003 ?instagram. }\n", " OPTIONAL { ?wikidata wdt:P2002 ?twitter. }\n", " OPTIONAL { ?wikidata wdt:P2013 ?facebook. }\n", " OPTIONAL { ?wikidata wdt:P2984 ?snapchat. }\n", " OPTIONAL { ?wikidata wdt:P3040 ?soundcloud. }\n", " OPTIONAL { ?wikidata wdt:P4208 ?billboard. }\n", " OPTIONAL { ?wikidata wdt:P434 ?musicbrainz. }\n", " SERVICE wikibase:label {\n", " bd:serviceParam wikibase:language \"en\".\n", " ?wikidata rdfs:label ?name.\n", " }\n", " }\n", " ORDER BY ASC(?wikidata) LIMIT 1000 OFFSET 26000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|\n", "SELECT\n", " ?company\n", " ?companyLabel ?countryLabel ?ownerOf ?industryLabel ?hqLabel\n", " ?hqPostalCode ?hqStreet ?hqStreetDep ?hqlon ?hqlat ?extckr\n", " ?legalFormLabel ?parent ?ownedBy\n", " ?ISIN ?legalEntityIdentifier ?openCorporatesID ?OKPO_ID ?hungarianCompanyID \n", " ?companiesHouseID ?germanTaxAuthorityID ?EUTransparencyRegisterID ?DUNSnumber ?danishP_number ?GS1code ?dataGouvFrOrganizationID \n", " ?permID ?bloombergCompanyID ?australianBusinessNumber ?australianCompanyNumber ?australianRegisteredBodyNumber \n", " ?czechRegistrationID ?austrianFirmenbuchnummer ?expediaHotelID ?centralIndexKey\n", " ?companySize ?UNSPSCCode ?inception\n", " ?legalName ?streetAddress ?website ?subsidiary\n", "WHERE\n", "{\n", " VALUES (?company) {\n", " (wd:Q30295499) (wd:Q30295501) (wd:Q30295504) (wd:Q30295518) (wd:Q30295527) (wd:Q30295531) (wd:Q30295528) (wd:Q30295533) (wd:Q30295545) (wd:Q30295583) (wd:Q30295588) (wd:Q30295606) (wd:Q30295638) (wd:Q30295640) (wd:Q30295652) (wd:Q30295659) (wd:Q30295665) (wd:Q30295676) (wd:Q30295686) (wd:Q30295685) (wd:Q30295701) (wd:Q30295710) (wd:Q30295711) (wd:Q30295709) (wd:Q30295715) (wd:Q30295717) (wd:Q30295724) (wd:Q30295736) (wd:Q30295737) (wd:Q30295775) (wd:Q30295798) (wd:Q30295797) (wd:Q30295803) (wd:Q30295828) (wd:Q30295842) (wd:Q30295866) (wd:Q30295871) (wd:Q30295868) (wd:Q30295891) (wd:Q30295893) (wd:Q30295931) (wd:Q30295952) (wd:Q30295972) (wd:Q30295973) (wd:Q30296016) (wd:Q30296143) (wd:Q30296155) (wd:Q30296250) (wd:Q30296282) (wd:Q30296304) (wd:Q30296335) (wd:Q30296346) (wd:Q30296387) (wd:Q30296490) (wd:Q30296590) (wd:Q30296707) (wd:Q30297139) (wd:Q30297143) (wd:Q30297210) (wd:Q30297230) (wd:Q30297228) (wd:Q30297239) (wd:Q30297243) (wd:Q61751518) (wd:Q61751517) (wd:Q61751521) (wd:Q61751531) (wd:Q61751536) (wd:Q61751548) (wd:Q61751558) (wd:Q61751562) (wd:Q61751563) (wd:Q61751561) (wd:Q61751567) (wd:Q61751569) (wd:Q61751582) (wd:Q61751591) (wd:Q61751588) (wd:Q61751604) (wd:Q61751656) (wd:Q61751685) (wd:Q61751690) (wd:Q61751691) (wd:Q61751698) (wd:Q61751699) (wd:Q61751701) (wd:Q61751705) (wd:Q61751713) (wd:Q61751720) (wd:Q61751738) (wd:Q61751739) (wd:Q61751742) (wd:Q61751754) (wd:Q61751758) (wd:Q61751775) (wd:Q61751772) (wd:Q61751776) (wd:Q61751804) (wd:Q61751812) (wd:Q61751822)\n", " } \n", " { \n", " OPTIONAL {\n", " ?company p:P159 ?hqLS.\n", " OPTIONAL { ?hqLS pq:P281 ?hqPostalCode. }\n", " OPTIONAL { ?hqLS pq:P6375 ?hqStreet. }\n", " OPTIONAL { ?hqLS pq:P969 ?hqStreetDep. }\n", " #todo: located on street (P669)\n", " OPTIONAL { ?hqLS ps:P159 ?hq. }\n", " OPTIONAL {\n", " ?hqLS pqv:P625 ?c.\n", " ?c wikibase:geoLongitude ?hqlon.\n", " ?c wikibase:geoLatitude ?hqlat. }\n", " }\n", " OPTIONAL { ?company wdt:P946 ?ISIN. }\n", " OPTIONAL { ?company wdt:P1278 ?legalEntityIdentifier. }\n", " OPTIONAL { ?company wdt:P1320 ?openCorporatesID. }\n", " OPTIONAL { ?company wdt:P2391 ?OKPO_ID. }\n", " OPTIONAL { ?company wdt:P2619 ?hungarianCompanyID. }\n", " OPTIONAL { ?company wdt:P2622 ?companiesHouseID. }\n", " OPTIONAL { ?company wdt:P2628 ?germanTaxAuthorityID. }\n", " OPTIONAL { ?company wdt:P2657 ?EUTransparencyRegisterID. }\n", " OPTIONAL { ?company wdt:P2771 ?DUNSnumber. }\n", " OPTIONAL { ?company wdt:P2814 ?danishP_number. }\n", " OPTIONAL { ?company wdt:P3193 ?GS1code. }\n", " OPTIONAL { ?company wdt:P3206 ?dataGouvFrOrganizationID. }\n", " OPTIONAL { ?company wdt:P3347 ?permID. }\n", " OPTIONAL { ?company wdt:P3377 ?bloombergCompanyID. }\n", " OPTIONAL { ?company wdt:P3548 ?australianBusinessNumber. }\n", " OPTIONAL { ?company wdt:P3549 ?australianCompanyNumber. }\n", " OPTIONAL { ?company wdt:P3551 ?australianRegisteredBodyNumber. }\n", " OPTIONAL { ?company wdt:P4156 ?czechRegistrationID. }\n", " OPTIONAL { ?company wdt:P5285 ?austrianFirmenbuchnummer. }\n", " OPTIONAL { ?company wdt:P5651 ?expediaHotelID. }\n", " OPTIONAL { ?company wdt:P1128 ?companySize. }\n", " OPTIONAL { ?company wdt:P1454 ?legalForm. }\n", " OPTIONAL { ?company wdt:P2167 ?UNSPSCCode. }\n", " OPTIONAL { ?company wdt:P749 ?parent. }\n", " OPTIONAL { ?company wdt:P571 ?inception. }\n", " OPTIONAL { ?company wdt:P127 ?ownedBy. }\n", " OPTIONAL { ?company wdt:P1448 ?legalName. }\n", " OPTIONAL { ?company wdt:P6375 ?streetAddress. }\n", " OPTIONAL { ?company wdt:P5531 ?centralIndexKey. }\n", " }\n", " UNION {\n", " ?company p:P414 ?exchangeStm. \n", " OPTIONAL { ?exchangeStm pq:P249 ?t. }\n", " ?exchangeStm ps:P414 ?e.\n", " ?e rdfs:label ?l\n", " FILTER (LANG(?l) = \"en\")\n", " BIND(IF (BOUND(?t), CONCAT(?l, \":\", ?t), ?l) as ?extckr).\n", " }\n", " UNION\n", " { ?company wdt:P1830 ?ownerOf. }\n", " UNION \n", " { ?company wdt:P452 ?industry. }\n", " UNION \n", " { ?company wdt:P856 ?website. }\n", " UNION \n", " { ?company wdt:P17 ?country. }\n", " UNION \n", " { ?company wdt:P355 ?subsidiary. }\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n", "}\n", "|[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", " SELECT * WHERE {\n", " ?wikidata (wdt:P106/wdt:P279*) wd:Q36834.\n", " OPTIONAL { ?wikidata wdt:P1477 ?birthname. }\n", " OPTIONAL { ?wikidata wdt:P569 ?dob. }\n", " OPTIONAL { ?wikidata wdt:P19 ?place_of_birth. }\n", " OPTIONAL { ?wikidata wdt:P21 ?gender. }\n", " OPTIONAL { ?wikidata wdt:P1828 ?ipi. }\n", " OPTIONAL { ?wikidata wdt:P1902 ?spotify. }\n", " OPTIONAL { ?wikidata wdt:P1953 ?discogs. }\n", " OPTIONAL { ?wikidata wdt:P2003 ?instagram. }\n", " OPTIONAL { ?wikidata wdt:P2002 ?twitter. }\n", " OPTIONAL { ?wikidata wdt:P2013 ?facebook. }\n", " OPTIONAL { ?wikidata wdt:P2984 ?snapchat. }\n", " OPTIONAL { ?wikidata wdt:P3040 ?soundcloud. }\n", " OPTIONAL { ?wikidata wdt:P4208 ?billboard. }\n", " OPTIONAL { ?wikidata wdt:P434 ?musicbrainz. }\n", " SERVICE wikibase:label {\n", " bd:serviceParam wikibase:language \"en\".\n", " ?wikidata rdfs:label ?name.\n", " }\n", " }\n", " ORDER BY ASC(?wikidata) LIMIT 1000 OFFSET 3000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?item ?linkcount ?url WHERE {\n", "# ?item wdt:P1343 wd:Q24205103\n", " ?item p:P1343/prov:wasDerivedFrom/pr:P854 ?url .\n", " OPTIONAL {?item wikibase:sitelinks ?linkcount . }\n", " FILTER NOT EXISTS { ?wen schema:about ?item; schema:isPartOf . } \n", "} |[os_family -> Mac OS X, os_major -> 10, os_minor -> 15, browser_major -> 82, browser_family -> Firefox, device_family -> Other, wmf_app_version -> -] |\n", "| PREFIX xsd: \n", " PREFIX schema: \n", "\n", " SELECT DISTINCT ?item ?IMDb_ID ?Freebase_ID ?sitelink ?publication_dateLabel ?genreLabel ?country_of_originLabel ?original_language_of_workLabel ?number_of_seasons ?number_of_episodes ?start_time WHERE {\n", " ?item wdt:P31/wdt:P279* wd:Q11424.\n", "\n", " SERVICE wikibase:label { bd:serviceParam wikibase:language \"[AUTO_LANGUAGE],en\". }\n", " OPTIONAL { ?item wdt:P345 ?IMDb_ID. }\n", " OPTIONAL { ?item wdt:P646 ?Freebase_ID. }\n", " ?sitelink schema:about ?item.\n", " ?sitelink schema:inLanguage \"en\".\n", " ?sitelink schema:isPartOf .\n", " OPTIONAL { ?item wdt:P577 ?publication_date. }\n", " OPTIONAL { ?item wdt:P136 ?genre. }\n", " OPTIONAL { ?item wdt:P495 ?country_of_origin. }\n", " OPTIONAL { ?item wdt:P364 ?original_language_of_work. }\n", " OPTIONAL { ?item wdt:P2437 ?number_of_seasons. }\n", " OPTIONAL { ?item wdt:P1113 ?number_of_episodes. }\n", " OPTIONAL { ?item wdt:P580 ?start_time. }\n", " FILTER(BOUND(?IMDb_ID)) ## filter anything that has an IMDB\n", " # FILTER(BOUND(?publication_date))\n", " FILTER((?publication_date >= \"2016-01-01T00:00:00Z\"^^xsd:dateTime) && (?publication_date <= \"2016-06-30T00:00:00Z\"^^xsd:dateTime)||(?start_time >= \"2016-01-01T00:00:00Z\"^^xsd:dateTime) && (?start_time <= \"2016-06-30T00:00:00Z\"^^xsd:dateTime))\n", " }\n", " |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|\n", " SELECT * WHERE {\n", " ?wikidata (wdt:P106/wdt:P279*) wd:Q36834.\n", " OPTIONAL { ?wikidata wdt:P1477 ?birthname. }\n", " OPTIONAL { ?wikidata wdt:P569 ?dob. }\n", " OPTIONAL { ?wikidata wdt:P19 ?place_of_birth. }\n", " OPTIONAL { ?wikidata wdt:P21 ?gender. }\n", " OPTIONAL { ?wikidata wdt:P1828 ?ipi. }\n", " OPTIONAL { ?wikidata wdt:P1902 ?spotify. }\n", " OPTIONAL { ?wikidata wdt:P1953 ?discogs. }\n", " OPTIONAL { ?wikidata wdt:P2003 ?instagram. }\n", " OPTIONAL { ?wikidata wdt:P2002 ?twitter. }\n", " OPTIONAL { ?wikidata wdt:P2013 ?facebook. }\n", " OPTIONAL { ?wikidata wdt:P2984 ?snapchat. }\n", " OPTIONAL { ?wikidata wdt:P3040 ?soundcloud. }\n", " OPTIONAL { ?wikidata wdt:P4208 ?billboard. }\n", " OPTIONAL { ?wikidata wdt:P434 ?musicbrainz. }\n", " SERVICE wikibase:label {\n", " bd:serviceParam wikibase:language \"en\".\n", " ?wikidata rdfs:label ?name.\n", " }\n", " }\n", " ORDER BY ASC(?wikidata) LIMIT 1000 OFFSET 27000 |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT ?entity ?entityLabel ?wikiLink ?linkLanguage\n", "WHERE\n", "{\n", "\t?entity p:P691/ps:P691 \"xx0154378\" .\n", "\n", "\tOPTIONAL {\n", "\t\t?wikiLink a schema:Article ;\n", "\t\tschema:about ?entity ;\n", "\t\tschema:inLanguage ?linkLanguage .\n", "\t}\n", "\n", "\tSERVICE wikibase:label {\n", "\t\tbd:serviceParam wikibase:language \"cs,en,sk,de,fr,pl,ru,it,es,pt\" .\n", "\t}\n", "} |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> -, browser_family -> Other, device_family -> Other, wmf_app_version -> -] |\n", "|SELECT DISTINCT ?item WHERE { ?item wdt:P31 wd:Q5; wdt:P17 []; wdt:P569 ?birth . FILTER(YEAR(?birth) > 1850) } |[os_family -> Other, os_major -> -, os_minor -> -, browser_major -> 2, browser_family -> Python Requests, device_family -> Other, wmf_app_version -> -] |\n", "+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n", "only showing top 100 rows\n", "\n" ] } ], "source": [ "df_timedout.select('query', 'user_agent_map').show(100, False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "PySpark - YARN", "language": "python", "name": "spark_yarn_pyspark" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }