Wikipedia:Request a query
|
|||||
This page has archives. Sections older than 14 days may be auto-archived by Lowercase sigmabot III if there are more than 4. |
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 pages that meet certain criteria, consider using PetScan (user manual) or the default search. PetScan can generate lists 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.
The database replicas do not have access to page content, so queries which require checking wikitext cannot be answered with database queries. In particular, there is no way to query for template parameters or anything related to references. However, someone may be able to assist by querying in another way (for example, checking for external links rather than references) or suggest an alternative tool.
Searching for pages with edits by Rambot that contain *both* of two edit summary types
[edit]Hello, I would like to have a list of page titles (almost certainly all redirects relating to US places) edited by Rambot that contain *both* of the following edit summaries in the same page history, the first being "Added geographic and demographic data" and the second starting with "Moved article to". Back in the early days, Rambot did several hundred cut-and-paste moves; most have been repaired by now, but I just found a few more relating to Massachusetts towns like Lenox, Massachusetts, and was wondering if there were any more in other US states. A live example which I haven't history-merged yet because it's already way past my bedtime is in the page history at Hopkinton (town), Middlesex County, Massachusetts . The history at such examples is relatively trivial, but often leads to other more substantial history that needs to be merged. Thanks for your help. Graham87 (talk) 19:05, 14 August 2025 (UTC)
Editors who would become extended confirmed upon their next edit
[edit]For statistical purposes, I'm wondering if I could get a count of editors who would become extended confirmed upon their next edit? That is, editors with 500 edits, account age >30 days, and are not/have never previously been extended confirmed? Best, HouseBlaster (talk • he/they) 02:03, 17 August 2025 (UTC)
- 122. List at quarry:query/96352. —Cryptic 02:21, 17 August 2025 (UTC)
- Would editors with more than 500 edits also qualify? How about those with exactly 499 edits (assuming that no pages they have edited get deleted before their next edit)? Certes (talk) 10:41, 17 August 2025 (UTC)
More than 500 might, if they hadn't edited since before extendedconfirmed existed; I don't know offhand whether qualified users were promoted en masse at the time, and can see arguments either way for whether they should have. Will investigate later.No, also ones who made their 501st edit before their account was 30 days old, but none since. So, yeah, likely lots.499 edits wouldn't, since autopromotion happens on the 501st edit. Deletion doesn't matter either, since user_editcount is only incremented when you make an edit, and not ever decremented. —Cryptic 12:04, 17 August 2025 (UTC)- So, looking like 27736, unless I missed something else. The first autopromotions happened at 23:17, 5 April 2016. (That seems way late to me - I'd have guessed closer to 2010 - but it turns out to be right.) 903 of these accounts have edited since then (page ten of quarry:query/96352), so 26833 are entirely left over from before the group existed. —Cryptic 12:34, 17 August 2025 (UTC)
- Thanks, Cryptic and Certes :) HouseBlaster (talk • he/they) 16:25, 17 August 2025 (UTC)
- So, looking like 27736, unless I missed something else. The first autopromotions happened at 23:17, 5 April 2016. (That seems way late to me - I'd have guessed closer to 2010 - but it turns out to be right.) 903 of these accounts have edited since then (page ten of quarry:query/96352), so 26833 are entirely left over from before the group existed. —Cryptic 12:34, 17 August 2025 (UTC)
Flooding AFD
[edit]@Czarking0 has an idea about how to measure AFD nominations, specifically focused on how many editors open a disproportionate number of AFD nominations. The context is a discussion about AI/LLM users potentially flooding AFD in the future.
This would require knowing the name of the editor (or some sort of unique identifier that's consistent within the set) who created any given AFD subpage + the creation date for that subpage (e.g., I created Wikipedia:Articles for deletion/Theopathy on July 3rd, so the needed information would be something like "WhatamIdoing – 20250703012900").
But rather than doing Czarking0's original analytical plan, which sounds like a lot of work, could you look at a random sample of weeks in a year, and tell us what the most number of AFD subpages created by any individual editor is? If nobody's normally creating more than 10 or 20 in one week, I think we can safely skip the "hard work" part and propose a limit based on common sense. WhatamIdoing (talk) 01:07, 9 September 2025 (UTC)
- I think there is a lot value in common sense stats. Out of professional pride, I will note there are a ton of caveats for estimating maximums which I would have to re-familiarize myself with to do a true statistical study. In terms of sampling, I think we could draw meaningful results from eight random weeks in each of the last five years. That is also a small enough amount of data that I could do it by hand if needed. Czarking0 (talk) 01:18, 9 September 2025 (UTC)
- Five years takes us back to August/September of 2020, which was during the Covid lockdowns. Editing patterns were off that year. Could we do 10 random non-overlapping weeks in the last four years? WhatamIdoing (talk) 01:22, 9 September 2025 (UTC)
- I think I can save you some steps? quarry:query/97012 has, for each week of the year, everyone who's created more than 10, along with the total afds created that week, starting in 2020. I don't think a random sampling of weeks would have given you a good picture, whether or not you picked one of the weeks where a single user created a full quarter of the afds (there were several). But if you really want the full datasets, let me know. —Cryptic 02:46, 9 September 2025 (UTC)
- Five years takes us back to August/September of 2020, which was during the Covid lockdowns. Editing patterns were off that year. Could we do 10 random non-overlapping weeks in the last four years? WhatamIdoing (talk) 01:22, 9 September 2025 (UTC)
List of new WikiProject pages
[edit]
I'd like a query that will find pages meeting these criteria:
- Begin with
Wikipedia:WikiProject
- Are not subpages
- Have been created recently (e.g., last few months, this calendar year)
WhatamIdoing (talk) 01:20, 9 September 2025 (UTC)
- I recently fixed the one at Database Reports that basically does this but only looks at the past 30 days (from recentchanges). Check this out: Wikipedia:Database reports/New WikiProjects. If you need to go back further, I could rewrite it. Let me know. Stefen 𝕋ower's got the power!!1! Gab • Gruntwerk 02:15, 9 September 2025 (UTC)
- Thanks! I looked back through the history to find some others. It looks like in the last year or so, about 10 pages have been created, and probably more than half of those could be deleted at MFD. I'll take the list to WT:COUNCIL. WhatamIdoing (talk) 02:51, 9 September 2025 (UTC)
- Looking at the database report, I'd add to my original criteria: "4. Not a redirect (including 'not a soft redirect')" and "5. Not already deleted." WhatamIdoing (talk) 02:59, 9 September 2025 (UTC)
- In the previous report, it included a deleted one only because I asked for it to be deleted after the report was generated. Anyway, I think these criteria are mostly doable, although I'm not sure offhand if the database supports checking for soft redirects. I can probably look at this tomorrow. Stefen 𝕋ower's got the power!!1! Gab • Gruntwerk 03:17, 9 September 2025 (UTC)
- Looking at the database report, I'd add to my original criteria: "4. Not a redirect (including 'not a soft redirect')" and "5. Not already deleted." WhatamIdoing (talk) 02:59, 9 September 2025 (UTC)
- (Wouldn't using the page creation log be easier and faster? Plus, it wouldn't limit you to 30 days' age. —Cryptic 03:05, 9 September 2025 (UTC))
- Perhaps. I didn't challenge myself to make the existing report better like I did with "WikiProjects by human changes". I literally just fixed the database bug in it. Stefen 𝕋ower's got the power!!1! Gab • Gruntwerk 03:10, 9 September 2025 (UTC)
- Hrm. Neither of these are going to find pages created somewhere else and later moved to Wikipedia:WikiProject Whatever, like Wikipedia:WikiProject Sustainable Development was in July. I found that by starting at page and working back to a creation timestamp, but that wouldn't work either for a page created long ago and only recently moved. And the move log is miserable to work with, though since we only care about the current location, it's at least feasible. —Cryptic 03:23, 9 September 2025 (UTC)
- That looks like the only one, which isn't really surprising. I didn't attempt to look more than one move back in the query, but there were few enough to check manually; all the other moves this year were either from other WP:WikiProject* titles or were reverts of moves away from those. —Cryptic 03:43, 9 September 2025 (UTC)
- In that case, I could check for "Wikiproject" as well as "WikiProject". Since we show redirects, we would pick up where it originally came from. That may not resolve all cases, but resolving all cases might be harsh, performance-wise. Stefen 𝕋ower's got the power!!1! Gab • Gruntwerk 03:45, 9 September 2025 (UTC)
- The case I expected to find (and didn't initially) was a page created in userspace or draft:, edited a bit, then moved to WP:WikiProject*. Going back a bit further to the start of 2023, that's happened at (at least) Wikiproject Africa environment, Draft:Wikipedia:WikiProject Australian Transport, User:LoomCreek/sandbox/Wikiproject Housing and Tenant Rights, and User:Zazpot/WikiProject Risk. There aren't enough pages currently at Wikipedia:WikiProject% that querying them is time-intensive; the main issue is that it's very difficult to look more than one move back to omit the innocuous moves like WP:WikiProject Ireland->Baldonnel, County Dublin->WP:WikiProject Ireland but not ones like [[(some hypothetical title in userspace)]]->WP:WikiProject Abandoned Articles->WP:WikiProject Abandoned articles. —Cryptic 03:58, 9 September 2025 (UTC)
- Thanks! I looked back through the history to find some others. It looks like in the last year or so, about 10 pages have been created, and probably more than half of those could be deleted at MFD. I'll take the list to WT:COUNCIL. WhatamIdoing (talk) 02:51, 9 September 2025 (UTC)