Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 14. jún 2025

Súbor: [Platon] / scripts / shell / topzaw / queries.txt (stiahnutie)

Revízia 1.2, Sat Apr 12 10:51:16 2003 UTC (22 years, 2 months ago) by nepto


Zmeny od 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.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok