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
Livnetata
.
find the last edit the user that created a page made before someone else made an edit.
Toggle Highlighting
SQL
SELECT page, rev6.rev_id as rev_id, user_text, time, start_time, max_time, time-start_time as diff FROM (SELECT rev3.rev_page as page, rev4.rev_user_text as user_text, MAX(rev4.rev_timestamp) as time, max_time, start_time FROM (SELECT rev1.rev_page as rev_page, rev1.rev_user_text as rev_user_text, rev2.rev_user_text as start_user, MIN(rev1.rev_timestamp) as max_time, rev2.start_time as start_time FROM (SELECT rev_page, rev_user_text, rev_timestamp FROM hewiki_p.revision WHERE rev_deleted = 0) as rev1 INNER JOIN (SELECT rev_page, rev_user_text, rev_timestamp as start_time FROM hewiki_p.revision WHERE rev_deleted = 0 AND LCASE(rev_user) NOT LIKE '%bot%' AND rev_parent_id = 0 #AND rev_page > 56731 #LIMIT 100 ) as rev2 ON rev1.rev_page = rev2.rev_page AND rev1.rev_user_text != rev2.rev_user_text #WHERE rev1.rev_deleted = 0 # AND LCASE(rev1.rev_user) NOT LIKE '%bot%' GROUP BY rev1.rev_page) as rev3 INNER JOIN (SELECT rev_page, rev_user_text, rev_timestamp FROM hewiki_p.revision) as rev4 ON rev3.rev_page = rev4.rev_page AND rev3.max_time > rev4.rev_timestamp AND rev3.start_user = rev4.rev_user_text GROUP BY rev4.rev_page) as rev5 INNER JOIN (SELECT rev_page, rev_id, rev_timestamp FROM hewiki_p.revision) as rev6 ON page = rev6.rev_page AND time = rev6.rev_timestamp ;
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...