Testwiki:Request a query/Archive/2017/02

From testwiki
Jump to navigation Jump to search

Template:Archive

Wikisites without that label

Is it possible to create a list with all items that have a page in a specific language, but not a label in that language on Wikidata? Like Template:Q, it has a page in nl, but no label in nl. Q.Zanden questions? 22:18, 31 January 2017 (UTC)

This is an example for Template:Q:
Template:SPARQL For bigger projects like nlwiki the query times out. --Pasleim (talk) 14:26, 1 February 2017 (UTC)

@Pasleim, Thank you! Does the query also time out when you set a limit? Q.Zanden questions? 14:33, 1 February 2017 (UTC)

Females with male given names

Might I request a report showing items with an en.wiki article, in which the gender is female but the given name is a male given name

Template:SPARQL--ԱշոտՏՆՂ (talk) 10:49, 1 February 2017 (UTC)

Maybe this can be useful as well:
Template:SPARQL--Jklamo (talk) 17:08, 1 February 2017 (UTC)


Thank you both. I realised I was actually after women labelled as men - in my correction below, is there a standard means of getting the link to en.wiki to look less hideous? (Images helped, but I've excluded them from this example ... meanwhile gendered given name turns out to be a very poor proxy for gender!) --Tagishsimon (talk) 01:56, 2 February 2017 (UTC)
Template:SPARQL

Duplicate items

Is it possible to create a list with items that have the same aliasses, labels (and descriptions) as another item in at least 3 languages? Q.Zanden questions? 13:34, 3 February 2017 (UTC)

Only one specific value

Hi, is there any query that can show items which have only one value for a given property? For example, I want all items with P31:Q5 and P31 has no other Qxxs.--ԱշոտՏՆՂ (talk) 09:30, 4 February 2017 (UTC)

A simple solution would be: Template:Sparql It does not work for P31:Q5 due to timeouts, so I chose P106:Q42973 here. —MisterSynergy (talk) 09:42, 4 February 2017 (UTC)
Thank you very much, MisterSynergy.--ԱշոտՏՆՂ (talk) 09:51, 4 February 2017 (UTC)

In en.wiki Category:Libraries_by_region but not having a

Hey All, I am looking to try to do a query either on Query Service or Petscan (or another tool if their is a better one), where I get a list of all the articles in the enwiki Category:Libraries by region, that doesn't contain a class or subclass of "Library" in the instance of. I have tried a half dozen different uses of Petscan, but it doesn't appear to be working. Can anyone help? Sadads (talk) 15:50, 4 February 2017 (UTC)

Sure. But it is probably not very helpful due to flaws in the enwiki category tree. We could try to optimize this query a bit, but it would be useful to know what your task exactly looks like. But I think it will never become a clean set of just libraries without P31/P279*:Q7075 as requested by you.
Petscan is indeed the best tool for such queries, since it combines data from Wikidata with categorization of a Wikipedia. The query service does not have any information about Wikipedia categorization. You can also use Petscan to add claims in a batch (after you’ve authorized Widar). Regards, —MisterSynergy (talk) 16:42, 4 February 2017 (UTC)
Template:Ping Yeah, I wasn't sure how to configure Petscan to do subclassess, but that SPARQL model is super useful gives me a really good way to work from it. Definitely not doing batch edits: I want to do some work cleaning up the category tree on enwiki, and want to see if I can find any more libraries than the 5000 or so we have identified so far per https://tools.wmflabs.org/sqid/#/view?id=Q7075 . It seems like we are way under represented, and the subclasses are way under utilized, even if we consider the information on articles on enwiki. Thanks for the help, and I will see what I can do from here, Sadads (talk) 19:37, 4 February 2017 (UTC)

Comment causes server error

A unfortunately quite long query I am writing begins to raise a "Server error" and I don't know why …

If I run the following query as is the server error appears. If I delete line 73 that is commented out anyway it runs … :-(

Any hints why it behaves so strangely or simplifications of the code are very welcome!!

(You'll have to copypaste the code, the link does not seem to work since I had to use <nowiki>-tags.) Template:SPARQL

Thanks, --Marsupium (talk) 20:00, 30 January 2017 (UTC)

Template:Ping Your query is just (a little) to long. Shorting it by a bit, eg. by deleting some comments or maybe white space, will make it work again. Related tasks: T112151, T125299. Cheers, Hoo man (talk) 14:58, 31 January 2017 (UTC)
Ah, okay! Thanks a lot! --Marsupium (talk) 10:43, 5 February 2017 (UTC)

GeoJSON

Hey. Just created a map of terror attacks in Jerusalem and I was wondering if I could download this map as GeoJSON in order to use it in mw:Help:Extension:Kartographer--Mikey641 (talk) 13:20, 8 February 2017 (UTC)

I'm not aware of such a function but it might not even necessary to do the detour via GeoJSON. The Kartographer extension can be fed directly with a SPARQL query (e.g. mw:Help:Extension:Kartographer#GeoShapes via Wikidata Query) but I don't know how it works in detail. --Pasleim (talk) 13:19, 10 February 2017 (UTC)

Works named for living persons

Especially films which were devoted to living persons (i.e. published when a person was still living). Can I have a list of it? --Infovarius (talk) 16:43, 8 February 2017 (UTC)

Template:SPARQL --Pasleim (talk) 13:05, 10 February 2017 (UTC)

Hi, We are discussing a new photo challenge for best photographs for "undocumented" places, or places with Wikidata item but no images on Commons. One of the requirements we would like to have is that those will be new images are for existing items. One query we would need to flag potential images that do not meet the challenge requirements, would be a query to capture the date of item creation and the dates of Template:P and Template:P creation (if present). Do we have a way to do such queries in SPARQL or is it something we would need quarry for? --Jarekt (talk) 14:35, 6 February 2017 (UTC)

Information about an item history is not available by the query service, so you have quarry. --Pasleim (talk) 13:11, 10 February 2017 (UTC)
Thank you I will try to figure it out in SQL. --Jarekt (talk) 14:30, 14 February 2017 (UTC)

I'm wondering if you can send me a SPARQL code which gives me a list of featured wikipedia articles in one language, that do not exist on another language (for example feature enwiki with no existence in frwiki) of the same category (e.g. mathematics). That would be awesome and appreciated. --Sky xe (talk) 22:48, 12 February 2017 (UTC)

Not possible with SPARQL since it doesn't have access to wiki categories. But you can use SPARQL queries in PetScan. Matěj Suchánek (talk) 16:17, 13 February 2017 (UTC)
PetScan WikiProject based query [1] (0 results). --Jklamo (talk) 18:13, 13 February 2017 (UTC)

Would it be possible to list all items with a certain badge in xyzwiki? That could help to identify missing or misplaced badges for a certain wiki. -- Innocent bystander (talk) 18:53, 13 February 2017 (UTC)

Template:Sparql--Edgars2007 (talk) 08:40, 14 February 2017 (UTC)

Thanks for the answers. I used PetScan before to find missing articles of certain categories, but I still don't know how to make my output only includes featured or good articles (badge), that's why I thought it might be possible using SPARQL directly. I have got a code from the wiki data presentation of Asaf Bartov which gives featured articles of African Women on enwiki with no corresponding articles on the frwiki. What is needed now, is just a modification to do it with categories (if possible). I posted the code on my user page: [2] --Sky xe (talk) 00:44, 14 February 2017 (UTC)

Something like this. --Edgars2007 (talk) 08:50, 14 February 2017 (UTC)
really awesome. That is what I wanted. Thank you Edgars --Sky xe (talk) 05:17, 15 February 2017 (UTC)

Why isn't bubblechart showing?

Hello, I have this query to show gender balance in Basque Wikipedia biography articles. But I can't get it to show BubbleChart visualization. Could someone explain me why?

Template:SPARQL

Thanks. -Theklan (talk) 20:43, 15 February 2017 (UTC)

This one works (changed ?gender -> ?genderLabel):
Template:Sparql--Edgars2007 (talk) 15:22, 16 February 2017 (UTC)
Template:Ping Great! I tried exactly that and it gave an error . -Theklan (talk) 19:48, 16 February 2017 (UTC)

Hi, i am trying to do a query which would give qualifiers from under the some properties from some items.

How to get unspecified list of qualifiers?

Example would be return all candidates for some election and return property Template:P with all it's qualifiers. (Example item: Template:Q and Template:P)

 SELECT ?electionLabel ?candidateLabel ?candidate WHERE {
  ?candidate wdt:P726 ?election.
  ?election wdt:P361 wd:Q640715.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fi". } 
 }

--Zache (talk) 04:12, 17 February 2017 (UTC)

It's not possible (anyway, I don't know a way how) to make columns dynamic, so I had to make it look like this:
Template:SPARQL
Matěj Suchánek (talk) 20:01, 17 February 2017 (UTC)

P27 = Q801 and born before 1948

Thank you. --Thibaut120094 (talk) 14:37, 20 February 2017 (UTC)

Template:SPARQL --Pasleim (talk) 14:58, 20 February 2017 (UTC)
Template:Ping someone could come to israel even if they weren't born in it. For example, most russians who live in israel came to israel in 1991. It would be better to replace p569 in Template:P--Mikey641 (talk) 15:02, 20 February 2017 (UTC)

Demonym of a country(P1549) for a particular language

For example, the demonym of Canada in English should just return "Canadian". How would I go about doing this? SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } does not work on demonym labels.

You should use FILTER and LANG on P1549:

Template:SPARQL -- Envlh (talk) 13:15, 21 February 2017 (UTC) Thanks! Mitsubayashi13 (talk) 02:02, 22 February 2017 (UTC)

A query that lists all the articles in a specific language whose WD items have less than 10 statements

Hello SPARQL magicians, could you help us by constructing a WD query that will generate a list of all the articles in X language (say, Hebrew :)), for which the WD items have less than Y statements (say, 10)? This request is from a WD newbie in the Hebrew Community. I did look for variations in the query examples, but could't find anything relevant. Am I missing anything..? Does something similar already exists? Thanks in advance for your help with this. Best, Shani Evenstein (talk) 18:58, 21 February 2017 (UTC)

Template:SPARQL --TweetsFactsAndQueries (talk) 20:22, 21 February 2017 (UTC)
Thanks much! Will do! :) Shani Evenstein (talk) 22:41, 21 February 2017 (UTC)

Women educated at or employed by an educational institute within a country

I have a query I use as the basis of a Listeria report, listing all women educated at or employed by a named educational institute - in the example below, the subject institute is Template:Q

Please help me to amend the report so as to list all women with no en.wiki biog, educated at or employed by an educational institute within a country ... i.e. I wish to specify the country, and get all pertinent items, where the item has an educated at or employed by property pointing to an educational institution within that country. (For educated at, I think we can just check the linked item is within the country. For employed by, we'd need to know that the item is an educational institute and that it is within the country. I'd settle for just 'educated at'. if 'employed by' is too difficult.) thanks --Tagishsimon (talk) 20:51, 21 February 2017 (UTC)

Template:SPARQL

Search for with subclass depth, first image and return labels in all languages

Hello SPARQL magicians and experts, I've been trying for 2 days and went through all examples. I need your help figuring out a complicated query that I haven't found an example close to

The idea is to search for sports, get the first image (if one is found). and retrieve the labels in all languages. Below I achieved a small part but here are the problems.

1- with this query, I'm able to get basketball but not football, I cannot figure out how to make search with subclass as footbal is a subclass of type of sports, I thought I had it working right but it doesn't return football.

2- when I add to fetch image (tried with optional), it returns "bodybuilding" in 2 rows because there are 2 images for boxing, is there a way to get the first one row with first image only. I tried distinct and didn't get far with it.

3- In this case I'm searching in English but would like to get back labels in all languages.

The perfect result out of this would be 10 rows where each row would be 1 sport starting with "bo", first image and labels in all languages, I understand that it might be a tall order so maybe languages would have to be requested in another query and if so, how?

Template:SPARQL Template:Unsigned

sport starting with "bo"football starts with fo. Matěj Suchánek (talk) 17:30, 22 February 2017 (UTC)

Sorry if it wasn't clear Matěj Suchánek but as you can see my questions talks about both "fo" and "bo"; the question is still valid.Template:Unsigned

I'm not able to handle the third mentioned problem and am curious as well about how to dynamically change exported variables (as this is the only way how to fetch the labels).
I think the cause of the first problem could be the LIMIT you are applying. The second point needs to be solved by doing multiple chained queries:
Template:SPARQL
Matěj Suchánek (talk) 20:28, 22 February 2017 (UTC)

Items with a specific property

How do I find all items with a specific property? In particular, I want all items that have the IPNI property set. Might it be good to add a trivial example like this to the list of examples? HYanWong (talk) 09:23, 22 February 2017 (UTC)

Template:SPARQL If you’d like to see the values as well, use the query SELECT ?item ?value { ?item p:P961 [ ps:P961 ?value ] . }. —MisterSynergy (talk) 10:58, 22 February 2017 (UTC)
Perfect, thanks. HYanWong (talk) 11:43, 22 February 2017 (UTC)
I normally use SELECT ?item ?value { ?item p:P961 ?value. }, but with square brackets is much faster (6540 ms vs 23359 ms) , good to know. --ValterVB (talk) 18:00, 22 February 2017 (UTC)

Hey. I was wondering if it's possible to create a list of items using SPARQL in which the wikidata label isn't like the sitelink (in hewiki).
for example if the label is "ABC" but sitelink is "DEF" it will appear, but if both the sitelink and the label are "ABC" it won't appear.
Thanks--Mikey641 (talk) 22:31, 4 February 2017 (UTC)

Template:Sparql It is limited to 5.000 items to avoid timeouts. For full results you could possibly omit the final FILTER command, download full data to your machine and perform the comparison offline with a small script. But basically: yes, this is possible. —MisterSynergy (talk) 07:26, 5 February 2017 (UTC)
It's case sensitive, probably is necessary change it in case insensitive. --ValterVB (talk) 08:00, 5 February 2017 (UTC)
Good point for many languagues/scripts, but for Hebrew language I am not sure whether it has case sensitivity at all. If so, replace the last FILTER command by FILTER(false = (LCASE(SUBSTR(STR(?hewiki_sitelink), 31)) = LCASE(ENCODE_FOR_URI(LCASE(STR(?he_label))))) ) .. This works for most, but not all label/sitelinks combinations, although it is not at all a beautiful solution. It is a bit difficult here that the sitelinks come URL-encoded, while the labels do not. Unfortunately I do not find a function to URL decode an encoded URL to a plain string, which would be helpful here. —MisterSynergy (talk) 08:24, 5 February 2017 (UTC)
There wasn't such function at SPARQL.--Edgars2007 (talk) 08:33, 5 February 2017 (UTC)
That was my assumption. I usually use this reference and it does not list any useful decoding function. It might be better anyway to download full plain results from sparql (qitem+sitelink+label) and perform the comparison offline with a more powerful script. —MisterSynergy (talk) 08:44, 5 February 2017 (UTC)
See my comment at #Sitelinks. Matěj Suchánek (talk) 08:52, 5 February 2017 (UTC)
Ah, cool! schema:name simplifies the query to Template:Sparql This is still case sensitive, but it avoids all URL encoding problems. —MisterSynergy (talk) 09:14, 5 February 2017 (UTC)
Yes, work also with case insensitive version. Just to complicate matters: you can exclude the items with a parenthesis in the Sitelinks to exclude disambiguation? --ValterVB (talk) 10:03, 5 February 2017 (UTC)
Found it: case insensitive and without ")" in sitelink: Template:Sparql --ValterVB (talk) 10:16, 5 February 2017 (UTC)
ValterVB, Matěj Suchánek thank you very much!!! you really helped me--Mikey641 (talk) 17:48, 7 February 2017 (UTC)
Something go wrong when I change it->ru. It gives many absolutely equal words... --Infovarius (talk) 09:40, 9 February 2017 (UTC)
Template:Ping Template:SPARQL This should work. —MisterSynergy (talk) 09:44, 9 February 2017 (UTC)

Template:Ping: You shouldn't exclude items with parentheses, because not all such are disambiguation pages. You should cut out the parenthesized part. Else you'd exclude https://en.wikipedia.org/wiki/Georgia_(country) for example

And why do you guys use this strange filter(false=(x=y))? Use filter(x<>y) --Vladimir Alexiev (talk) 16:46, 23 February 2017 (UTC)

Template:Ping Yes, but if I don't exclude them I have too many results to check. About the strange filter I'm not expert but I copy a lot :) so I don't know if exist a more efficient filter. --ValterVB (talk) 17:09, 23 February 2017 (UTC)
It's the same as efficiency, but harder to read. My name is not inconceivably: --Vladimir Alexiev (talk) 17:32, 23 February 2017 (UTC)

Alias = label

Hey. Is there any way to find a list of items in which the Alias = label? thanks--Mikey641 (talk) 20:25, 22 February 2017 (UTC)

Template:SPARQL --Pasleim (talk) 13:53, 23 February 2017 (UTC)

External Identifiers used for Companies

Trying to find all External Identifier props used for Companies. This finds all external identifier props:

Template:Sparql

But if I uncomment the part about Company, I get a timeout. The bracketry is probably confusing, so we can expand it like this for clarity:

   filter exists {?company ?wdt ?any_prop; wdt:P31/wdt:P279* wd:Q783794}

--Vladimir Alexiev (talk) 17:05, 23 February 2017 (UTC)

controlling the use of Template:P

Can one of you make a query that list items that use P1889 but the page they refer to, does not have that property. Q.Zanden questions? 11:14, 14 February 2017 (UTC)

Template:Sparql
?item2 is the item, which doesn't have P1889. --Edgars2007 (talk) 12:52, 14 February 2017 (UTC)
Thank you! Is it possible to do this with a bot, instead of doing everything manual? Q.Zanden questions? 19:40, 14 February 2017 (UTC)
Is it possible - yes, it's trivial. I'm simply not sure, that we have to do that. IMHO, it's more important to have this claim at the other item (in SPARQL query - ?item). The claim on ?item2 isn't so important. But I really don't have strong oppinion. --Edgars2007 (talk) 09:41, 15 February 2017 (UTC)
I suppose that there needn't to be the same property at other item, sometimes it's sufficient to have some another property (like Template:P or Template:P or other) which would show that they are not the same. --Infovarius (talk) 19:55, 20 February 2017 (UTC)
Template:Ping "different from" is declared instance of: symmetric property. So why do you argue in some cases it's "not important" to have it in the other direction? --Vladimir Alexiev (talk) 16:53, 23 February 2017 (UTC)
See, for example, Template:Q: one doesn't need Template:P Template:Q because there is Template:P with this value already. And it doesn't depend whether Template:Q contains Template:P Template:Q or not. Of course, formally (and even, technically) one can add Template:P too, but I regard it as redundant. --Infovarius (talk) 23:19, 23 February 2017 (UTC)

Time zone locations on map

I would like to have a query where for a given time zone (e.g. UTC+1) all the locations are displayed on a map. Thank you in advance! Steak (talk) 14:31, 22 February 2017 (UTC)

Template:SPARQL
Be careful, there are 123,000+ results, it may crash your browser. Matěj Suchánek (talk) 20:32, 22 February 2017 (UTC)
Thank you! Steak (talk) 19:56, 23 February 2017 (UTC)

Consider a Lisetria list such as https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Women_in_Red/Missing_articles_by_education/Spain_-_Complutense_University_of_Madrid ... how can I add a column showing whether or not there is an es.wiki article on the subject? How can I add a column or columns showing interlanguage links to other languages? thanks --Tagishsimon (talk) 21:17, 22 February 2017 (UTC)

You can export arbitrary data from SPARQL to Listeria by adding the variable to the SELECT clause, then you have to expand the columns= parameter with ,?variable:column name. See also the documentation. Matěj Suchánek (talk) 20:01, 23 February 2017 (UTC)

Finding property values with the same string in them

I'm working on matching Template:P into Wikidata. This is an unusual resource because it's divided up into volumes by date, and so a single person may appear in two or three volumes if their career spanned both periods. However, no-one should have two entries in the same volume, and I'd like to construct a query to find these.

Because of the way the URLs are constructed ([volume]/member/[name]) this means that I need to find any entry with:

  • more than one P1614
  • ...two of which start with the same string (if it helps, the eight volumes are [1386-1421, 1509-1558, 1558-1603, 1604-1629, 1660-1690, 1690-1715, 1715-1754, 1754-1790, 1790-1820, 1820-1832])

Is it possible to write a query to look for this? (As a test case, Template:Q should show up - there is a bug in the source URLs and so he's listed twice in 1820). Andrew Gray (talk) 13:32, 23 February 2017 (UTC)

Template:SPARQL --Pasleim (talk) 13:46, 23 February 2017 (UTC)
Awesome, thanks! Works a charm (and finds an error I'd missed, which is exactly what I was hoping for) Andrew Gray (talk) 20:20, 23 February 2017 (UTC)

schema:name

This is not directly a request for a query, but related to SPARQL querying. As I learnt by Matěj Suchánek recently, there is a (newly introduced) feature to access the lemma (Wikipedia page title) of sitelinks via schema:name. To my knowledge it is roughly used like this: ?wikilink schema:about ?item; schema:name ?lemma.

Unfortunately there is only sparse documentation about schema:name available and I do not fully understand how it works. Is it supposed to be available for any sitelink, or only in some special cases? In this SPARQL query only ~900 out of ~6600 sitelinks have a value, so why is it missing for most sitelinks? Thanks, MisterSynergy (talk) 06:09, 11 February 2017 (UTC)

Maybe all the triples haven't been updated yet. Compare:
Template:SPARQL
and
Template:SPARQL
The numbers are still changing. Matěj Suchánek (talk) 09:16, 11 February 2017 (UTC)
Thanks for the answer. I am going to try this again at some point in the future. —MisterSynergy (talk) 09:37, 11 February 2017 (UTC)

Template:Ping There's probably >100M sitelinks on WD, so don't expect the query to easily count them all. Try your query on some restricted set --Vladimir Alexiev (talk) 16:49, 23 February 2017 (UTC)

According to one of the queries by Matěj Suchánek above there should be ~55M sitelinks. I was not planning to query all of them at once, of course :-) Just as a subsequent filter to a query that results in some thousand items. --MisterSynergy (talk) 12:22, 24 February 2017 (UTC)

Items with P106 but no Q5 in catalan wikipedia

I know it begins with ?person wdt:P106 [] . but I don't know how to do the rest. Thanks, Paucabot (talk) 10:14, 25 February 2017 (UTC)

Template:SPARQL
Be aware, that many(?) items are fictional characters. --Edgars2007 (talk) 13:53, 25 February 2017 (UTC)
Thanks! Paucabot (talk) 16:29, 25 February 2017 (UTC)

Male tennis players without an ATP ID

Hi, I'm trying to create a list of male (P21) tennis players (P106 = Q10833314), born before 1950, who do not have a value for the ATP ID property (P536). Tried the following query but it did not return any records. --Wolbo (talk) 13:50, 25 February 2017 (UTC)

Template:Sparql

Replace ?player wdt:P536 ?atp_id . with filter not exists {?player wdt:P536 ?atp_id . } and delete FILTER isBLANK(?atp_id) . --Edgars2007 (talk) 13:56, 25 February 2017 (UTC)
Thanks for the quick response. I now have this query but it gave me a timeout.--Wolbo (talk) 14:05, 25 February 2017 (UTC)

Template:Sparql

Got it, the second OPTIONAL line was from a previous query and once deleted the query works. This stuff is interesting and fun!. --Wolbo (talk) 14:29, 25 February 2017 (UTC)
Template:Ec Faster query: Template:Sparql
--Edgars2007 (talk) 14:34, 25 February 2017 (UTC)

Аward winners for Listeria

I already inserted Listeria tables in 2-3 articles about award winners, but I have two problems. First, I do not know how to add references? How are they extracted from SPARQL querry? And how to repeat author if he was a lauerat for two or more times?

Here is the example/problem I face sr:НИН-ова награда. I would like to make a table with one row for each year, not for each author. And also, it would be nice to add references as the last column.

Here sr:Дисова награда, and here sr:Жичка хрисовуља (награда) I have the same problem. Could anyone help!? Thanks! --Милан Јелисавчић (talk) 19:36, 25 February 2017 (UTC)

Select for Day of Birth

Supposing I want to look for women with en.wiki articles who died on 25 March in any year, to add to the w:en:March 25 page ... what would be the query for that? My attempt below finds nothing, but removing FILTER(SUBSTR(STR(?dummydate),1,6) = 'Mar 25') . finds Mar 25 entries. Where (or how) am I going wrong? thanks --Tagishsimon (talk) 15:02, 26 February 2017 (UTC)

Template:SPARQL
Not the right direction... See Wikidata talk:SPARQL query service/queries#Find people who were born in summer. --Edgars2007 (talk) 15:05, 26 February 2017 (UTC)
Note, that you can replace all that "it has to have enwiki article" part with line from #Items with P106 but no Q5 in catalan wikipedia. --Edgars2007 (talk) 15:07, 26 February 2017 (UTC)
Thanks Edgars2007, very much appreciated. Here's my homework - works a treat (this instance for 8 Aug). --Tagishsimon (talk) 19:28, 26 February 2017 (UTC)
Template:SPARQL

Time zones and locations

Template:P used to be applied mainly to countries. Currently this has been expanded to any type of locality.

It might be worth trying to build a series of queries that check Template:P values by comparing them to P17 (countries should have the same P421), P131 and/or P625.

These could be either separate Listeria reports and/or complex constraints on Property talk:P421.
--- Jura 09:14, 26 February 2017 (UTC)

Looks like there are too many statements to do this in across several countries in one query. To start:

--- Jura 04:17, 28 February 2017 (UTC)

Qualifier value not fetching

Can you please help why this query not returning value for some items.

Template:SPARQL

Please help. Thanks -- Mdmahir (talk) 11:49, 28 February 2017 (UTC)

I have fixed it myself.

Template:SPARQL . --Mdmahir (talk) 17:46, 28 February 2017 (UTC)