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
HyperDelulu
.
Toggle Highlighting
SQL
-- Zadejte uživatelské jméno a časový údaj jako proměnné SET @username = 'Auvajs'; SET @timestamp = '20241211100000'; -- Počet editací před stanoveným datem SELECT COUNT(*) INTO @edit_count FROM revision_userindex r JOIN page p ON p.page_id = r.rev_page WHERE r.rev_actor = (SELECT a.actor_id FROM actor_revision a WHERE a.actor_name = @username) AND p.page_namespace = 0 AND r.rev_timestamp <= @timestamp; -- Počet editací za poslední měsíc SELECT COUNT(*) INTO @recent_edit_count FROM revision_userindex r WHERE r.rev_actor = (SELECT a.actor_id FROM actor_revision a WHERE a.actor_name = @username) AND r.rev_timestamp <= DATE_FORMAT(DATE_SUB(@timestamp, INTERVAL 1 MONTH), '%Y%m%d%H%i00'); -- Porovnání podmínek a výpis zprávy IF @edit_count > 149 AND @recent_edit_count > 0 THEN SELECT CONCAT(@username, ' ist stimmberechtigt.'); ELSE SELECT CONCAT(@username, ' ist nicht stimmberechtigt.'); END IF;
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...