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
Danilo.mac
.
Note that this query use rechentchanges table, where the oldest and newest days are incomplete.
Toggle Highlighting
SQL
USE ptwiki_p; SELECT DAY, COUNT(*) TOTAL_USERS, SUM(user_registration IS NULL OR user_registration < SUBDATE(DAY * 1000000, 365)) USERS_REG_MORE_THAN_1_YEAR_BEFORE, SUM(user_registration > SUBDATE(DAY * 1000000, 30)) USERS_REG_LESS_THAN_30_DAYS_BEFORE FROM (SELECT DISTINCT SUBSTR(rc_timestamp, 1, 8) DAY, actor_user FROM recentchanges INNER JOIN actor ON rc_actor = actor_id WHERE rc_type IN (0, 1) AND actor_user IS NOT NULL ) x INNER JOIN user ON actor_user = user_id GROUP BY DAY;
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...