Jump to content

Wikipedia:Request a query

From Wikipedia, the free encyclopedia
(Redirected from Wikipedia:SQL requests)

This is a page for requesting one-off database queries for certain criteria. Users who are interested and able to perform SQL queries on the projects can provide results from the Quarry website.

You may also be interested in the following:

  • If you are interested in writing SQL queries or helping out here, visit our tips page.
  • If you need to obtain a list of article titles that meet certain criteria, consider using PetScan (user manual) or the default search. Petscan can generate list of articles in subcategories, articles which transclude some template, etc.
  • If you need to make changes to a number of articles based on a particular query, you can post to the bot requests page, depending on how many changes are needed.
  • For long-term review and checking, database reports are available.

Quarry does not have access to page content, so queries which require checking wikitext cannot be answered with Quarry. However, someone may be able to assist by using Quarry in another way (e.g. checking the table of category links rather than the "Category:" text) or suggest an alternative tool.

Cross Reference Request

[edit]

Would someone be able to cross-reference the links in this list Green Bay Packers All-Time Roster with to verify that every target page in that list is also categorized in that category. The goal for me here is to make sure the links in the list are targeted to the right article. As an example, the list had Rex Smith, when it should have had Rex Smith (American football) as he correct target. Thus, this cross reference will identify any disambiguation that needs to occur on that page for links that aren't disambiguation pages (which I have already fixed). Thank you! « Gonzo fan2007 (talk) @ 22:14, 18 September 2024 (UTC)[reply]

quarry:query/86383. —Cryptic 01:11, 19 September 2024 (UTC)[reply]
Cryptic, thank you! The query appears to be pulling the links from {{Green Bay Packers}}, which is on the page. Any way to exclude the template in the query? « Gonzo fan2007 (talk) @ 17:53, 19 September 2024 (UTC)[reply]
Only if you don't mind if links that appear on both the template and the page itself are excluded, too. —Cryptic 00:26, 20 September 2024 (UTC)[reply]
I dont mind! Thank you! « Gonzo fan2007 (talk) @ 00:59, 20 September 2024 (UTC)[reply]
Same query, updated in-place. —Cryptic 01:12, 20 September 2024 (UTC)[reply]
Thank you Cryptic! « Gonzo fan2007 (talk) @ 17:43, 20 September 2024 (UTC)[reply]

submitted drafts

[edit]

How do I check my submitted drafts — Preceding unsigned comment added by 79lives (talkcontribs) 12:07, 4 October 2024 (UTC)[reply]

Just currently-submitted ones, or ones that have been accepted, too?
If the first, you can see these by going to Special:Contributions/79lives, expanding "Search for contributions", picking "Draft" from the "Namespace" dropdown, and clicking the blue "Search" button. That gives you this.
If the second, Special:Log/create/79lives comes close. —Cryptic 13:09, 4 October 2024 (UTC)[reply]

how many transclusions of a list of templates

[edit]

Yeah, I can repeatedly fill in the blank but I'd really rather not have to do that. But, I don't know anything about database queries; hence my request.

Given a list of templates, is it possible to fetch each template's transclusion count and return both the template name and the count for each one? The templates that I have in mind are a filtered subset of the templates listed at Category:Lang-x templates.

Trappist the monk (talk) 16:14, 6 October 2024 (UTC)[reply]

Yes. Easiest way to filter the list is to make a user subpage with links to each one you want counted. Or quarry:query/86855 for every template in that category. —Cryptic 18:56, 6 October 2024 (UTC)[reply]
The every template in that category query is just fine; I should have said that the category is lightly filtered so those that I don't care about can be removed by hand.
Thank you very much.
Trappist the monk (talk) 19:23, 6 October 2024 (UTC)[reply]

Age of dormant accounts

[edit]

For the list at Wikipedia:List of Wikipedians by number of edits#1–1000, can you filter out still-active accounts (e.g., any edit during the last year?), and for the remaining ones, tell me:

  • how many are dormant, and
  • how many long the account was active for (e.g., if the person edited from 2010 to 2020, then say "10 years").

I want to write sentences that say things like "10% of our most-active editors are no longer editing" and "Among these former editors, most of them edited for about 10 years before quitting or being blocked". Ultimately, I'm hoping to use it as a way to ballpark a replacement rate for high-volume editors. This will be imperfect, but it might give me a very general idea. (Better suggestions are welcome.) WhatamIdoing (talk) 07:19, 14 October 2024 (UTC)[reply]

The only userpage linked from that list who hasn't edited in 2024 is Geo Swan. 6330 days between first and last edits, about 17 years four months. —Cryptic 14:42, 14 October 2024 (UTC)[reply]
The reason for that being that users who haven't edited in a while are normally unlinked. For some mysterious reason Geo Swan is still linked, though.
And Geo Swan is a bad example as they were banned (over a single incident that in my opinion did not warrant a ban) not chose to stop editing. * Pppery * it has begun... 16:31, 14 October 2024 (UTC)[reply]
Well, that's inconvenient, though I suppose that it makes it easier to figure out which editors are inactive. 727 out of 1,000 accounts are still linked; therefore, 27% of editors who have made the most edits are inactive. (There are also 11 "placeholders" and a couple of blocked accounts, so ±2%.)
It feels like blocks and bans are a non-trivial way for us to lose editors, so I would be inclined to keep them in the list. WhatamIdoing (talk) 18:19, 14 October 2024 (UTC)[reply]
I discovered why those usernames are unlinked part independently, after a couple iterations of a query that takes an hour and a half to complete. Très annoying. If you make a user subpage linking to just the unlinked users (and Geo Swan, too, I guess), I can rerun it against that. —Cryptic 22:17, 14 October 2024 (UTC)[reply]