Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, November 14, 2026

File: [Platon] / scripts / shell / topzaw / queries.txt (download)

Revision 1.2, Sat Apr 12 10:51:16 2003 UTC (23 years, 7 months ago) by nepto


Changes since 1.1: +2 -2 lines

Changed incorrect usage of word "uzivatel" ("užívateľ") to correct word
"pouzivatel" ("používateľ") on all places. Occurences of word in another
forms were changed as well.

1.) najvyssie total loginy

mysql> select username, concat(to_days(date_sub(total_login, interval 1 hour))-to_days(from_unixtime(0)), '-', date_format(date_sub(total_login, interval 1 hour), '%H-%i ')) as b from topzaw_20011112_125001 order by total_login desc limit 20;

2.) premenovanych za dany mesiac (dolezite je robit tieto dotazy len na mesiace
iduce hned po sebe aby sme zarucene odchytili kazdeho premenovaneho pouzivatela;
keby sme jeden mesiac preskocili, mohli by sme nejake premenovanie vynechat
z dovodu premenovania na nove meno v prvom mesiaci a premenovania na povodne
stare v dalsom mesiaci)

mysql> select t2.username as new_name, t1.username as old_name from topzaw_20011031_235000 as t1, topzaw_20011112_125001 as t2 where t1.id = t2.id and t1.username not like t2.username;

3.) TTL plus 

mysql> select t2.username, t2.total_login - t1.total_login as diff from topzaw_20010930_235000 as t1, topzaw_20011031_235000 as t2 where t1.id = t2.id and (t2.total_login - t1.total_login > 0) order by diff desc;

4.) TTL minus

mysql> select t2.username, t2.total_login - t1.total_login as diff from topzaw_20010930_235000 as t1, topzaw_20011031_235000 as t2 where t1.id = t2.id and (t2.total_login - t1.total_login < 0) order by diff asc;

5.) Level plus

mysql> select t2.username, t2.level new_level, t1.level old_level, t2.level - t1.level as diff from topzaw_20010930_235000 as t1, topzaw_20011031_235000 as t2 where t1.id = t2.id and (t2.level - t1.level > 0) order by diff desc, new_level desc;

6.) Level minus

mysql> select t2.username, t2.level new_level, t1.level old_level, t2.level - t1.level as diff from topzaw_20010930_235000 as t1, topzaw_20011031_235000 as t2 where t1.id = t2.id and (t2.level - t1.level < 0) order by diff asc, old_level desc;

7.) Pocet pouzivatelov jednotlivych levelov + zoznam pouzivatelov

mysql> select level, count(*) from topzaw_20011031_235000 group by level;

mysql> select * from topzaw_20011031_235000 where level = 9;




Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top