SQL
x
use azwiki_p;
select now();
select count(*) as toplamRC from recentchanges rc ;
select count(*) as toplamSonGun from recentchanges rc where rc.rc_timestamp > DATE_ADD(NOW(), INTERVAL -1 DAY);
select count(*) as toplamRCipDegil from recentchanges rc join user u on u.user_id = rc.rc_user where u.user_id > 0;
select count(*) as toplamSonGunipDegil from recentchanges rc join user u on u.user_id = rc.rc_user where rc.rc_timestamp > DATE_ADD(NOW(), INTERVAL -1 DAY) and u.user_id > 0;
select count(*) as toplam1ay from recentchanges rc where rc.rc_timestamp > DATE_ADD(NOW(), INTERVAL -1 MONTH);
select count(*) as toplam30gun from recentchanges rc where rc.rc_timestamp > DATE_ADD(NOW(), INTERVAL -30 DAY);
SELECT floor(rc.rc_timestamp/1000000) as gun, count(*), datediff(NOW(), 1000000* floor(rc.rc_timestamp/1000000)) as kacgun from recentchanges rc group by 1;
SELECT MIN(rc.rc_timestamp) as ilk, DATEDIFF(NOW(),MIN(rc.rc_timestamp)) as farkgun from recentchanges rc;
SELECT rc.rc_timestamp, rc.rc_user_text, rc.rc_title from recentchanges rc where rc.rc_timestamp < DATE_ADD(NOW(), INTERVAL -32 DAY) ORDER by 1 asc
limit 100;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.