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
Jura1
.
Toggle Highlighting
SQL
# test # See also https://upload.wikimedia.org/wikipedia/commons/f/f7/MediaWiki_1.24.1_database_schema.svg use wikidatawiki_p; SELECT pp_value, COUNT(ips_site_id) as cnt, GROUP_CONCAT(REPLACE(ips_site_id,"wiki","") ORDER BY ips_site_id) as sites FROM page, wb_entity_per_page, wb_items_per_site, enwiki_p.categorylinks JOIN enwiki_p.page_props ON pp_page=cl_from WHERE cl_to LIKE "1%" AND cl_to RLIKE "1\d{3}_deaths" #IN #("1990_deaths") #("1800_deaths", "1801_deaths", "1802_deaths", "1803_deaths", "1804_deaths", "1805_deaths", "1806_deaths", "1807_deaths", "1808_deaths", "1809_deaths", "1810_deaths", "1811_deaths", "1812_deaths", "1813_deaths", "1814_deaths", "1815_deaths", "1816_deaths", "1817_deaths", "1818_deaths", "1819_deaths", "1820_deaths", "1821_deaths", "1822_deaths", "1823_deaths", "1824_deaths", "1825_deaths", "1826_deaths", "1827_deaths", "1828_deaths", "1829_deaths", "1830_deaths", "1831_deaths", "1832_deaths", "1833_deaths", "1834_deaths", "1835_deaths", "1836_deaths", "1837_deaths", "1838_deaths", "1839_deaths", "1840_deaths", "1841_deaths", "1842_deaths", "1843_deaths", "1844_deaths", "1845_deaths", "1846_deaths", "1847_deaths", "1848_deaths", "1849_deaths", "1850_deaths", "1851_deaths", "1852_deaths", "1853_deaths", "1854_deaths", "1855_deaths", "1856_deaths", "1857_deaths", "1858_deaths", "1859_deaths", "1860_deaths", "1861_deaths", "1862_deaths", "1863_deaths", "1864_deaths", "1865_deaths", "1866_deaths", "1867_deaths", "1868_deaths", "1869_deaths", "1870_deaths", "1871_deaths", "1872_deaths", "1873_deaths", "1874_deaths", "1875_deaths", "1876_deaths", "1877_deaths", "1878_deaths", "1879_deaths", "1880_deaths", "1881_deaths", "1882_deaths", "1883_deaths", "1884_deaths", "1885_deaths", "1886_deaths", "1887_deaths", "1888_deaths", "1889_deaths", "1890_deaths", "1891_deaths", "1892_deaths", "1893_deaths", "1894_deaths", "1895_deaths", "1896_deaths", "1897_deaths", "1898_deaths", "1899_deaths", # "1900_deaths", "1901_deaths", "1902_deaths", "1903_deaths", "1904_deaths", "1905_deaths", "1906_deaths", "1907_deaths", "1908_deaths", "1909_deaths", "1910_deaths", "1911_deaths", "1912_deaths", "1913_deaths", "1914_deaths", "1915_deaths", "1916_deaths", "1917_deaths", "1918_deaths", "1919_deaths", "1920_deaths", "1921_deaths", "1922_deaths", "1923_deaths", "1924_deaths", "1925_deaths", "1926_deaths", "1927_deaths", "1928_deaths", "1929_deaths", "1930_deaths", "1931_deaths", "1932_deaths", "1933_deaths", "1934_deaths", "1935_deaths", "1936_deaths", "1937_deaths", "1938_deaths", "1939_deaths", "1940_deaths", "1941_deaths", "1942_deaths", "1943_deaths", "1944_deaths", "1945_deaths", "1946_deaths", "1947_deaths", "1948_deaths", "1949_deaths", "1950_deaths", "1951_deaths", "1952_deaths", "1953_deaths", "1954_deaths", "1955_deaths", "1956_deaths", "1957_deaths", "1958_deaths", "1959_deaths", "1960_deaths", "1961_deaths", "1962_deaths", "1963_deaths", "1964_deaths", "1965_deaths", "1966_deaths", "1967_deaths", "1968_deaths", "1969_deaths", "1970_deaths", "1971_deaths", "1972_deaths", "1973_deaths", "1974_deaths", "1975_deaths", "1976_deaths", "1977_deaths", "1978_deaths", "1979_deaths", "1980_deaths", "1981_deaths", "1982_deaths", "1983_deaths", "1984_deaths", "1985_deaths", "1986_deaths", "1987_deaths", "1988_deaths", "1989_deaths", "1990_deaths", "1991_deaths", "1992_deaths", "1993_deaths", "1994_deaths", "1995_deaths", "1996_deaths", "1997_deaths", "1998_deaths", "1999_deaths", # "2000_deaths", "2001_deaths", "2002_deaths", "2003_deaths", "2004_deaths", "2005_deaths", "2006_deaths", "2007_deaths", "2008_deaths", "2009_deaths", "2010_deaths", "2011_deaths", "2012_deaths", "2013_deaths", "2014_deaths", "2015_deaths", "2016_deaths") #("2000_deaths", "2001_deaths", "2002_deaths", "2003_deaths", "2004_deaths", "2005_deaths", "2006_deaths", "2007_deaths", "2008_deaths", "2009_deaths", "2010_deaths", "2011_deaths", "2012_deaths", "2013_deaths", "2014_deaths", "2015_deaths") AND pp_propname="wikibase_item" AND cl_type="page" AND pp_value NOT IN (SELECT page_title FROM wikidatawiki_p.page JOIN wikidatawiki_p.pagelinks ON page_id=pl_from WHERE pl_title = "P570" AND pl_namespace = 120) AND pp_value = page_title AND epp_entity_id = ips_item_id AND epp_entity_type = "item" AND page_id = epp_page_id AND page_namespace = 0 GROUP BY pp_value HAVING COUNT(ips_site_id) >4 ORDER BY COUNT(ips_site_id) DESC LIMIT 900
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...