Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
EllenCT
.
The page_counter values are from a very old copy of the database: mostly 0s; max is 12421 for what should be several million. See quarry.wmflabs.org/query/1337 for more information. Last run on 7 March 2015.
Toggle Highlighting
SQL
USE enwiki_p; SELECT page_title as article, COUNT(DISTINCT rc.rc_id) as recent_edits, page_counter as deprecated_pageviews, -- ancient; see comment above COUNT(DISTINCT pl.pl_from) as inbound_wikilinks FROM page JOIN categorylinks AS cats ON page.page_id = cats.cl_from JOIN recentchanges AS rc ON page.page_title = rc.rc_title JOIN pagelinks AS pl ON page.page_title = pl.pl_title AND pl.pl_namespace = 0 -- careful: query won't terminate without this; wtf! WHERE cats.cl_to IN ("Economics", "Macroeconomics", "Welfare_economics", "Economic_growth", "Economy_of_the_United_States", "Economic_efficiency", "Organisation_for_Economic_Co-operation_and_Development_member_economies", "Politics_of_the_United_States", "Campaign_finance_in_the_United_States", "Campaign_finance_reform_in_the_United_States", "Taxation_and_redistribution", "Economic_inequality", "Unemployment‎", "Income_distribution", "Tax_incidence", "Economic_inequality_in_the_United States", "Distribution_of_wealth", "Corporate_inversions", "Offshore_finance", "Taxation_in_the_United_States", "Corporate_taxation_in_the_United_States", "Tax_reform_in_the_United_States", "United_States_federal_income_tax", "United_States_tax_law", "Tax_avoidance", "United_States_taxation_and_revenue_case_law", "Taxation_and_efficiency", "United_States_federal_taxation_legislation", "Welfare_state", "Local_taxation_in_the_United_States", "State_taxation_in_the_United_States", "United_States_proposed_federal_taxation_legislation", "Monetary_policy", "New_Keynesian_economics", "Keynesian_economics", "Business_cycle", "Business_cycle_theory", "International_taxation", "Economic_policy", "United_States_economic_policy", "Macroeconomic_policy", "Public_economics", "Bank_regulation", "Bank_regulation_in_the_United_States", "Taxation", "Economic_stimulus_programs", "Health_economics", "Income_distribution", -- "Demographics", "Poverty", -- these two don't really help find what I want "Basic_income", "Demographic_economics", "Tax_reform", "Public_policy") AND cats.cl_type = "page" AND page.page_namespace = 0 AND page.page_is_redirect = 0 AND rc.rc_namespace = 0 AND rc.rc_bot = 0 AND rc.rc_minor = 0 AND rc.rc_timestamp > DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 3 DAY),'%Y%m%d%H%i%s') GROUP BY article;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...