VOOZH about

URL: https://www.mediawiki.org/wiki/Talk:Quarry

⇱ Talk:Quarry - MediaWiki


Jump to content
From mediawiki.org
👁 Image
Archives

Need some information

[edit]
Latest comment: 10 months ago1 comment1 person in discussion

Do you know the exact date tagging started in 2015? Ashik Ahamed CU (talk) 16:20, 16 May 2025 (UTC)

Need Help

[edit]
Latest comment: 9 months ago3 comments3 people in discussion

Hi,

I ran a query on Quarry that shows "Query completed" but it doesn't return any results in the output section. I've double-checked my SQL syntax and database selection (enwiki). Could someone help me understand whether:

  1. There might be a temporary issue with Quarry itself?
  2. The result set is empty due to some data issue?
  3. I'm possibly missing something in the query structure?

Any help would be appreciated. Thanks in advance! Ashik Ahamed CU (talk) 03:52, 14 June 2025 (UTC)

I had the same for a while, now the results show, so answer [1]. KylieTastic (talk) 10:47, 14 June 2025 (UTC)
This was probably T396904: Query results do not appear due to JS error. -- BDavis (WMF) (talk) 18:15, 14 June 2025 (UTC)

Subcategories of Depth 3

[edit]
Latest comment: 9 months ago1 comment1 person in discussion

Hi there,

I am trying to retrieve all subcategories of the category "Personnalité_féminine" on the French Wikipedia.

I have this rather complex version of it which I forked from an existing Quarry. I am really just trying to retrieve the subcategories from the parent category.

My goal is to incorporate the list of subcategories in another query. I know that I have to leverage the recursive keyword which is why I landed on the query above.

Do you have any pointers on how to just get the subcategories at depth level 3?

I would really appreciate the help! MNSanchez (talk) 22:16, 16 June 2025 (UTC)

Help with query to count revisions adding external links

[edit]
Latest comment: 4 months ago1 comment1 person in discussion

Hello, I'm trying to count the number of revisions on the English Wikipedia that added an external link to 'twitter.com' or 'x.com' for each day in August 2023. I'm unable to run the query myself due to login restrictions. Could someone please run the following query for me on the enwiki database and post the results?


```sql

SELECT

DATE_FORMAT(rev_timestamp, '%Y-%m-%d') AS revision_date,

COUNT(*) AS daily_revisions

FROM revision

JOIN externallinks

ON rev_page = el_from

WHERE

(

el_to_domain_index LIKE '%.x.com'

OR el_to_domain_index LIKE '%.twitter.com'

)

AND rev_timestamp BETWEEN '20230801000000' AND '20230831235959'

GROUP BY

revision_date

ORDER BY

revision_date ASC;

```


Thank you in advance for your help! ~2025-34775-90 (talk) 15:34, 19 November 2025 (UTC)

cswikiversity

[edit]
Latest comment: 4 months ago2 comments2 people in discussion

Could you provide cswikiversity(_p) database please? Juandev (talk) 21:46, 22 November 2025 (UTC)

@Juandev The cswikiversity_p Wiki Replica database exists. It is possible that no one has queried this database via Quarry to populate the value in the database name list that is show when you start typing a database name, but if you put cswikiversity_p into the field along with a valid SQL query things should work fine. https://quarry.wmcloud.org/query/99286 is a quick test I made of this. -- BDavis (WMF) (talk) 18:10, 24 November 2025 (UTC)

Places to find & share useful queries? Categorize queries by project?

[edit]
Latest comment: 7 days ago5 comments3 people in discussion

Are there places where people list/share Quarry queries?

There isn't any such page on Commons it seems (eg uncategorized categories with redcats); at least it's not in c:Category:Quarry query tool.

It may be useful to the queries here by project (eg Wikipedia or Commons) so it's easier to discover them.

On the other hand, the queries are usually linked at the places where one would find them useful or look for them (eg this report page for the previous example).

But it's not always the case as with queries that are broadly applicable such as with this query for Commons to sort files by number of categories they have. And also some people look for queries that they can use to build the query they intend to (I guess for these cases maybe the search here works good enough). Even if they are linked at the places where the queries are useful for the projects, it maybe would still be useful to have a table-format list of quarry queries all on one page.
Prototyperspective (talk) 23:39, 11 February 2026 (UTC)

I think the problem is that such a place quickly becomes an endless pit of possibilities and outdated materials. Even en.wp cannot keep a list of 'useful userscripts' up to date for instance. There is https://quarry.wmcloud.org/query/runs/all?published=true&, which at least lists the published queries. —TheDJ (Not WMF) (talkcontribs) 13:36, 12 February 2026 (UTC)
Additionally, I would just ask AI. AI knows about the database structure of mediawiki, and is pretty good at writing SQL queries. —TheDJ (Not WMF) (talkcontribs) 13:36, 12 February 2026 (UTC)
an endless pit of possibilities what do you mean with that and outdated materials how would things get outdated but even then it would make it easier to find queries even if it also includes some later-revised our deprecated queries that haven't yet been removed or updated Even en.wp cannot keep a list of 'useful userscripts' up to date for instance that's probably also sth of importance to get some systematic effort of fixing it; [1] and [2] I think are two start-state approaches there where one can search and filter things etc
lists the published queries yes but it would be good to categorize the queries by project and additionally enabling votes and/or counts of forks and/or counts of users and/or sth like that by which one could sort would probably also be very useful.
I would just ask AI Exactly; but they don't know much about the contents of Wikimedia meta pages like [3] or VillagePump discussions or help pages etc. Asking it 'how to sort Wikimedia Commons files by number of categories' would not surface the query linked above to the user (and I've used that as an example) incl link to where there was talk about it and instructions how to use it. This is very precisely one reason for m:Community Wishlist/W442 and I don't think the large potential and usefulness is yet clear enough to a significant number of users. And regarding letting it write SQL: I think it would fail to get a functional query for exactly what the user wants (especially not easily without advanced technical and/or Wikimedia knowledge to readjust) but the bigger issue there is that the user looking for this probably doesn't even know about Quarry or if they know they didn't think it was possible with it or basically only possible that way plus there's of course also a lot of questions that aren't resolved with a quarry query. Prototyperspective (talk) 14:24, 12 February 2026 (UTC)
Seems like a good idea. Be W:WP:BOLD? Link to the list of published ones, mention AI, ... RememberOrwell (talk) 01:32, 29 March 2026 (UTC)

Unknown column 'cl_to' in 'WHERE'

[edit]
Latest comment: 1 month ago3 comments2 people in discussion

From Last 2 days, following error is being displayed... Kindly check

Unknown column 'cl_to' in 'WHERE'

refer:

https://quarry.wmcloud.org/query/102540

https://quarry.wmcloud.org/query/101823 Srinivasrjy (talk) 16:03, 3 March 2026 (UTC)

That's expected, cl_to has been removed in favor of cl_target_id. You can solve this with JOIN linktarget ON lt_id = cl_target_id WHERE lt_namespace = 14 AND lt_title = [value for cl_to]. --Matěj Suchánek (talk) 16:50, 3 March 2026 (UTC)
KIndly provide Modified quarry link.. Srinivasrjy (talk) 16:59, 3 March 2026 (UTC)