Jump to: navigation, search

About this board

Discussion area for discussion about Quarry itself and help about individual queries.

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
קיפודנחש (talkcontribs)

is there an API interface to query Quarry, or is the UI the only way to use it? peace.

Reply to "does quarry have API interface?"
Jarekt (talkcontribs)

Some queries of Wikidata can not be made in SPARQL, for example I would like to query a time of creation of a specific property of specific item (Lets try P31 of Q1). I could use help with the query itself and with documentation of Wikidata SQL schema. Also is there an easy way of searching Quarry for Wikidata queries?

Reply to "Wikidata queries"
Abschreibbar (talkcontribs)

My question was solved with

Reply to "Finding better image versions (SVG)"

External links in articles in a given category

The Polish (talkcontribs)

Given all pages in this category I would to find in what pages the is an external link to

Can you tell me what is wrong in this query.

Thanks in advance

Edgars2007 (talkcontribs)

It returned 0 rows, because you were querying enwiki, not plwiki :)

See updated (and rewritten) query. The main non-visual difference is "USE plwiki_p;"

The Polish (talkcontribs)

Thanks :D

Anmoldalmia (talkcontribs)

I have tried finding bots through their names in the tables. Any better way?

XXN (talkcontribs)


SELECT distinct user_name
FROM user
WHERE user_id in (select ug_user from user_groups where ug_group = "bot")
Сэм аласыз (talkcontribs)

Hi I Want a Code For SQL that What Links Here For Redirects With More Than 10 Links And The Title With English Letters how can I do that, thanks.

XXN (talkcontribs)

@Сэм аласыз:

	CONCAT('*[[',p.page_title,']]') as "title",
	COUNT(pl.pl_from) as WLH,
	CONCAT('[[Special:Whatlinkshere/{{ns:',p.page_namespace,'}}:',p.page_title,']]') as "Whatlinkshere link"
FROM page p
INNER JOIN pagelinks pl ON p.page_title = pl.pl_title AND p.page_namespace = pl.pl_namespace
INNER JOIN page p2 ON p2.page_id = pl.pl_from and p2.page_is_redirect=1
where p.page_namespace = 0# only articles ?
and p.page_title REGEXP '[A-Za-z]'
GROUP BY p.page_title
Reply to "any help with sql"
Ineuw (talkcontribs)

Uploaded and then deleted and replaced an Index: namespace file on Wikisource. Then, I realized that the deletion does not cascade to the related pages of the Page: namespace. My question is, am I permitted to delete these pages using SQL? I am an admin on Wikisource and this question is for future reference.

YuviPanda (talkcontribs)

Quarry is read only, so you can't actually do any updates / insertions via it.

Ineuw (talkcontribs)

YuviPanda, thanks for the reply.

Reply to "Old pages' deletions"
Ineuw (talkcontribs)

I have a number of old unpublished, and most likely non-working practice SQL statements. Is it possible for me to delete them?

Achim55 (talkcontribs)

You can blank them.

Ineuw (talkcontribs)

Unfortunately, blanking them does nothing. On reopening the page, the SQL statements are still there

Achim55 (talkcontribs)

Did you click Submit Query after blanking?

Ineuw (talkcontribs)

Now, that makes sense! Thank you. Happy holidays.

Ineuw (talkcontribs)

Again, Returning to mention that I cleared the SQL and submitted the query as told, but the empty queries remained on the list.

Achim55 (talkcontribs)

You cannot delete done queries. One can only blank them for to "hide" the used code.

Ineuw (talkcontribs)

Can I request deletion of the empty queries? There is at least 25 practice queries from which which I removed the SQL statements.

YuviPanda (talkcontribs)

You can't really delete any queries - even if you blank them they stay in the database (and we might expose the history at some point)

Reply to "Deleting my old SQL statements"
Ineuw (talkcontribs)

Is it possible to download data in tab delimited text format?

XXN (talkcontribs)

The option "TSV" (first) in download formats menu should do this. Or it's not what you want?

Ineuw (talkcontribs)

Thanks XXN. Tab Separated Values. How interesting. BTW, yes. This is what I was looking for.

Also, Excel (UTF-16).csv does not work in Windows, LibreOffice 5.2.

Reply to "Additional download formats"

Unreadable font (size) used for showing resultsets

Jdx (talkcontribs)

I use Firefox 47 running on WinXP. When a resultset is shown, I cannot see "dashes" in small letters such as "t" or "f", what is annoying. I have to zoom in (Ctrl + "+") in order to see the dashes. Is it possible to change the font to a more readable one or increase the size of the existing one?

Ineuw (talkcontribs)

In any version of Firefox \Preferences (Linux or Mac,) or \Options(Windows) in \Contents\Advanced, one can change the fonts or increase\decrease the font sizes which affect the display. Let me know it it works for you, it did for me. It may also be worthwhile to check the font settings of the wiki in the Preferences\Editing.

(FF v51.0b10 windows and Linux)

Reply to "Unreadable font (size) used for showing resultsets"