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
Zhuyifei1999
.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT log_timestamp AS first_upload, uploads, ( SELECT actor_user FROM actor_logging WHERE actor_id = act ) AS username FROM logging_userindex INNER JOIN ( SELECT MIN(log_id) AS first_upload_id, COUNT(log_timestamp) AS uploads, log_actor AS act FROM logging_userindex WHERE log_type = "upload" GROUP BY log_actor ) AS first_uploads ON log_id = first_upload_id AND log_id IN ( SELECT ct_log_id FROM change_tag WHERE ct_tag_id = 21 ); /* +------+--------------------+------------+--------+----------------------------------------------------------------------------+----------------------+---------+----------------------------------+----------+---------------------------------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------------+------------+--------+----------------------------------------------------------------------------+----------------------+---------+----------------------------------+----------+---------------------------------------------------------------------+ | 1 | PRIMARY | change_tag | ref | change_tag_log_tag_id,change_tag_tag_id_id | change_tag_tag_id_id | 4 | const | 371428 | Using where; Using index | | 1 | PRIMARY | logging | eq_ref | PRIMARY,type_time,log_type_action | PRIMARY | 4 | commonswiki.change_tag.ct_log_id | 1 | Using where | | 1 | PRIMARY | <derived3> | ref | key0 | key0 | 9 | commonswiki.change_tag.ct_log_id | 10 | Using where | | 3 | DERIVED | logging | ref | type_time,log_type_action | type_time | 34 | const | 52691072 | Using index condition; Using where; Using temporary; Using filesort | | 2 | DEPENDENT SUBQUERY | actor | eq_ref | PRIMARY | PRIMARY | 8 | first_uploads.act | 1 | Using where | | 7 | DEPENDENT SUBQUERY | logging | ref | type_time,actor_time,log_actor_type_time,log_actor_deleted,log_type_action | actor_time | 8 | commonswiki.actor.actor_id | 97712560 | Using where | +------+--------------------+------------+--------+----------------------------------------------------------------------------+----------------------+---------+----------------------------------+----------+---------------------------------------------------------------------+ */
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...