Вікіпедія:Проєкт:Тематичний тиждень/Тиждень Антарктики/Результати
Підсумки тижня
Створені статті
ред.
Створенні статті |
---|
USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(actor_name, 'Всього'),
created,
total_len,
articles
FROM
(
SELECT
CONCAT(actor_name) as actor_name,
COUNT(1) AS created,
SUM(article.page_len) as total_len,
GROUP_CONCAT(
DISTINCT
-- [[Назва статті]]
CONCAT('[[',
REPLACE(article.page_title, '_', ' '), -- замінюємо у назві '_' на ' '
']]', ' (', article.page_len, ')')
-- список впорядкований за назвою статті
ORDER BY article.page_len DESC
-- розділений пробілом
SEPARATOR ' · '
) AS articles
FROM page article
JOIN revision
ON rev_page = article.page_id AND
rev_parent_id = 0 AND
20200112 * 1000000 <= rev_timestamp AND
rev_timestamp < 20200129 * 10000000
JOIN page talk
ON talk.page_title = article.page_title AND
talk.page_namespace IN (0, 1)
JOIN templatelinks ON
tl_from = talk.page_id AND
tl_title = 'Antarctic-week-new' AND
tl_namespace = 10
join actor on revision.rev_actor = actor_id and actor_user is not null
WHERE
article.page_namespace = 0 AND
article.page_is_redirect = 0
GROUP BY rev_actor WITH ROLLUP) t,
(SELECT @rownum := -1) r
ORDER BY created DESC, total_len DESC
|
Поліпшені статті
ред.
Поліпшені статті |
---|
USE ukwiki_p;
SET SESSION group_concat_max_len = 10000;
SELECT @rownum := @rownum + 1 AS rank,
IFNULL(article, 'Всього'),
user_number,
size_increase,
users
FROM
(
SELECT
CONCAT('[[', REPLACE(page_title, '_', ' '), ']]') as article,
COUNT(1) AS user_number,
SUM(user_size_increase) as size_increase,
GROUP_CONCAT(
DISTINCT
REPLACE(
CONCAT(
'[[Користувач:', actor_name, '|', actor_name, ']]',
' (', user_size_increase ,')'),
'_', ' ')
ORDER BY user_size_increase DESC, rev_actor
SEPARATOR ' · '
) AS users
FROM
(SELECT
rev.rev_actor,
actor.actor_name,
article.page_title,
SUM(rev.rev_len) - SUM(parent_rev.rev_len) AS user_size_increase
FROM page article
-- отримати версії статей
JOIN revision rev
ON rev.rev_page = article.page_id AND
20200112000000 <= rev_timestamp AND
rev_timestamp < 20200129000000
-- разом із попередніми версіями
JOIN revision parent_rev
ON parent_rev.rev_id = rev.rev_parent_id
-- but created *before* the contest
JOIN revision create_rev
ON create_rev.rev_page = article.page_id AND
create_rev.rev_parent_id = 0 AND
20200112000000 > create_rev.rev_timestamp
-- і на сторінці обговорення чи у статі
JOIN page talk
ON talk.page_title = article.page_title AND
talk.page_namespace IN (0, 1)
-- має бути шаблон
JOIN templatelinks ON
tl_from = talk.page_id AND
tl_title = 'Antarctic-week-improve' AND
tl_namespace = 10
join actor on rev.rev_actor = actor_id and actor_user is not null
WHERE
article.page_namespace = 0 AND
article.page_is_redirect = 0
GROUP BY rev_actor, article.page_title) r
GROUP BY article WITH ROLLUP) t,
(SELECT @rownum := -1) r
ORDER BY size_increase DESC, user_number DESC;
|