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
HenriqueCrang
.
Toggle Highlighting
SQL
use ptwiki_p; #desc revision; select a.TOTAL+b.TOTAL as tretas, a.REVERSOR as usuario1, a.REVERTIDO as usuario2 from ( SELECT r.rev_user_text AS REVERSOR, rp.rev_user_text AS REVERTIDO, p.page_title AS ARTIGO, p.page_namespace AS NAMESPACE, count(*) AS TOTAL, concat(r.rev_user_text,rp.rev_user_text) AS teste1, concat(rp.rev_user_text,r.rev_user_text) AS teste2 FROM revision r INNER JOIN revision rp ON r.rev_parent_id = rp.rev_id INNER JOIN revision rpp ON rp.rev_parent_id = rpp.rev_id INNER JOIN page p ON r.rev_page = p.page_id WHERE r.rev_timestamp > 20160000000000 and r.rev_sha1 = rpp.rev_sha1 and r.rev_user != 0 and rp.rev_user != 0 and p.page_title = "Eça_de_Queirós" #and r.rev_page IN (select distinct cl_from from categorylinks where cl_to = "!Artigos_destacados") group by 1,2,3 ) a full outer join ( SELECT r.rev_user_text AS REVERSOR, rp.rev_user_text AS REVERTIDO, p.page_title AS ARTIGO, p.page_namespace AS NAMESPACE, count(*) AS TOTAL, concat(r.rev_user_text,rp.rev_user_text) AS teste1, concat(rp.rev_user_text,r.rev_user_text) AS teste2 FROM revision r INNER JOIN revision rp ON r.rev_parent_id = rp.rev_id INNER JOIN revision rpp ON rp.rev_parent_id = rpp.rev_id INNER JOIN page p ON r.rev_page = p.page_id WHERE r.rev_timestamp > 20160000000000 and r.rev_sha1 = rpp.rev_sha1 and r.rev_user != 0 and rp.rev_user != 0 and p.page_title = "Eça_de_Queirós" #and r.rev_page IN (select distinct cl_from from categorylinks where cl_to = "!Artigos_destacados") group by 1,2,3 ) b on a.teste1 = b.teste2 order by 1 desc ;
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...