"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

april forum stats

HP 01.05.2002 - 09:29 1967 58
Posts

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
ist schon da :D
Code:
select count(*)/(round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as ppd, count(*)/(24*round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as pph, count(*)/(1440*round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as ppm, count(*) as total, from_unixtime((dateline),"%Y/%m") as month from post group by month order by month;
+---------+-------+------+-------+---------+
| ppd     | pph   | ppm  | total | month   |
+---------+-------+------+-------+---------+
|    1.03 |  0.04 | 0.00 |    32 | 2000/03 |
|    5.93 |  0.25 | 0.00 |   178 | 2000/04 |
|    6.48 |  0.27 | 0.00 |   201 | 2000/05 |
|   20.43 |  0.85 | 0.01 |   613 | 2000/06 |
|   44.29 |  1.85 | 0.03 |  1373 | 2000/07 |
|  106.81 |  4.45 | 0.07 |  3311 | 2000/08 |
|  136.70 |  5.70 | 0.09 |  4101 | 2000/09 |
|  133.97 |  5.58 | 0.09 |  4153 | 2000/10 |
|  222.50 |  9.27 | 0.15 |  6675 | 2000/11 |
|  198.48 |  8.27 | 0.14 |  6153 | 2000/12 |
|  225.81 |  9.41 | 0.16 |  7000 | 2001/01 |
|  231.54 |  9.65 | 0.16 |  6483 | 2001/02 |
|  251.42 | 10.48 | 0.17 |  7794 | 2001/03 |
|  363.10 | 15.13 | 0.25 | 10893 | 2001/04 |
|  376.77 | 15.70 | 0.26 | 11680 | 2001/05 |
|  468.17 | 19.51 | 0.33 | 14045 | 2001/06 |
|  574.26 | 23.93 | 0.40 | 17802 | 2001/07 |
|  655.61 | 27.32 | 0.46 | 20324 | 2001/08 |
|  624.93 | 26.04 | 0.43 | 18748 | 2001/09 |
|  757.52 | 31.56 | 0.53 | 23483 | 2001/10 |
|  882.40 | 36.77 | 0.61 | 26472 | 2001/11 |
| 1005.29 | 41.89 | 0.70 | 31164 | 2001/12 |
| 1172.45 | 48.85 | 0.81 | 36346 | 2002/01 |
| 1272.57 | 53.02 | 0.88 | 35632 | 2002/02 |
| 1185.52 | 49.40 | 0.82 | 36751 | 2002/03 |
| 1239.30 | 51.64 | 0.86 | 37179 | 2002/04 |
|   10.68 |  0.44 | 0.01 |   331 | 2002/05 |
+---------+-------+------+-------+---------+
27 rows in set (4.07 sec)

edit: mehr werte sind immer gut :D:D

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
ROFL
OWNED

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
ROFLMAO
DOPPELOWNED
ich wollt deins grad editen fuer hour / day / month :))))))))

manalishi

tl;dr
Avatar
Registered: Feb 2001
Location: Feldkirch
Posts: 5977
1239.30 am tag! :eek:

luke

OC Addicted
Registered: Aug 2001
Location: vienna
Posts: 1068
......seit da murph im forum is san die postings ganz schön gestiegen.......:eek:

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
hrhr :D
siehe deine signatur :rolleyes: :D

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
anmeldungen und total users und users/posts fehlt noch =)

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
Zitat von funka
anmeldungen und total users und users/posts fehlt noch =)

herrst ... möcht v4 coden und nicht kranke sql-statements produzieren :rolleyes:

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
hehehehe

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
najo, einer geht noch :D

Code:
mysql> create table temp_date as 
select 
count(*)/(round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as ppd, 
count(*)/(24*round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as pph, 
count(*)/(1440*round((unix_timestamp(date_add(from_unixtime(dateline), interval 1 month))-dateline)/86400)) as ppm, count(*) as total, 
from_unixtime((dateline),"%Y/%m") as month 
from post group by month order by month; 
select temp_date.*, 
sum(month >= from_unixtime(joindate,"%Y/%m")) as totalusers, 
sum(month = from_unixtime(joindate,"%Y/%m")) as newusers, 
total/sum(month >= from_unixtime(joindate,"%Y/%m")) as ppu 
from temp_date left join user on (month >= from_unixtime(joindate,"%Y/%m")) group by month; 
drop table temp_date;
Query OK, 27 rows affected (3.72 sec)
Records: 27  Duplicates: 0  Warnings: 0

+---------+-------+------+-------+---------+------------+----------+-------+
| ppd     | pph   | ppm  | total | month   | totalusers | newusers | ppu   |
+---------+-------+------+-------+---------+------------+----------+-------+
|    1.03 |  0.04 | 0.00 |    32 | 2000/03 |         27 |       26 |  1.19 |
|    5.93 |  0.25 | 0.00 |   178 | 2000/04 |         62 |       35 |  2.87 |
|    6.48 |  0.27 | 0.00 |   201 | 2000/05 |         97 |       35 |  2.07 |
|   20.43 |  0.85 | 0.01 |   613 | 2000/06 |        154 |       57 |  3.98 |
|   44.29 |  1.85 | 0.03 |  1373 | 2000/07 |        218 |       64 |  6.30 |
|  106.81 |  4.45 | 0.07 |  3311 | 2000/08 |        300 |       82 | 11.04 |
|  136.70 |  5.70 | 0.09 |  4101 | 2000/09 |        397 |       97 | 10.33 |
|  133.97 |  5.58 | 0.09 |  4153 | 2000/10 |        480 |       83 |  8.65 |
|  222.50 |  9.27 | 0.15 |  6675 | 2000/11 |        568 |       88 | 11.75 |
|  198.48 |  8.27 | 0.14 |  6153 | 2000/12 |        662 |       94 |  9.29 |
|  225.81 |  9.41 | 0.16 |  7000 | 2001/01 |        772 |      110 |  9.07 |
|  231.54 |  9.65 | 0.16 |  6483 | 2001/02 |        945 |      173 |  6.86 |
|  251.42 | 10.48 | 0.17 |  7794 | 2001/03 |       1138 |      193 |  6.85 |
|  363.10 | 15.13 | 0.25 | 10893 | 2001/04 |       1287 |      149 |  8.46 |
|  376.77 | 15.70 | 0.26 | 11680 | 2001/05 |       1391 |      104 |  8.40 |
|  468.17 | 19.51 | 0.33 | 14045 | 2001/06 |       1500 |      109 |  9.36 |
|  574.26 | 23.93 | 0.40 | 17802 | 2001/07 |       1662 |      162 | 10.71 |
|  655.61 | 27.32 | 0.46 | 20324 | 2001/08 |       1803 |      141 | 11.27 |
|  624.93 | 26.04 | 0.43 | 18748 | 2001/09 |       1921 |      118 |  9.76 |
|  757.52 | 31.56 | 0.53 | 23483 | 2001/10 |       2042 |      121 | 11.50 |
|  882.40 | 36.77 | 0.61 | 26472 | 2001/11 |       2166 |      124 | 12.22 |
| 1005.29 | 41.89 | 0.70 | 31164 | 2001/12 |       2344 |      178 | 13.30 |
| 1172.45 | 48.85 | 0.81 | 36346 | 2002/01 |       2439 |       95 | 14.90 |
| 1272.57 | 53.02 | 0.88 | 35632 | 2002/02 |       2516 |       77 | 14.16 |
| 1185.52 | 49.40 | 0.82 | 36751 | 2002/03 |       2663 |      147 | 13.80 |
| 1239.30 | 51.64 | 0.86 | 37179 | 2002/04 |       2769 |      106 | 13.43 |
|   11.58 |  0.48 | 0.01 |   359 | 2002/05 |       2769 |        0 |  0.13 |
+---------+-------+------+-------+---------+------------+----------+-------+
27 rows in set (1.29 sec)

Query OK, 0 rows affected (0.13 sec)

AMDfreak

Little Overclocker
Avatar
Registered: Oct 2001
Location: Wien Neubau
Posts: 1406
Echt nicht schlecht, was man da alles aus den Tiefen der DB erfährt... :)

Edit:
Zitat
| Babes Home | Doedel Broedel | 72 | 0 |

:D :D :D
Bearbeitet von AMDfreak am 01.05.2002, 13:43

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
ich hab versucht das query bissi zu reformaten
damit jeder sieht wie sick das is :) :D :D :D

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
query für die forum0wnage (s.o.) :D

Code:
create table temp_forumstat as select username, count(*) as posts, forumid from post left join thread using(threadid) where 
post.dateline > 1017655200 and post.dateline < 1020160800 group by forumid, post.userid;
create table temp_forumstat2 as select forum.title, substring( max( concat(LPAD(posts,6,'0'),username)),7) as forum_0wner, 
0.00+LEFT(max( concat(LPAD(posts,6,'0'),username)),6) as posts from temp_forumstat left join forum using(forumid) group by 
temp_forumstat.forumid order by forum_0wner, forum.parentid, forum.displayorder; 
select temp_forumstat2.*, (moderator.userid is not null) as is_moderator from temp_forumstat2 left join user on (forum_0wner = username) left join forum on (temp_forumstat2.title = forum.title) left join moderator on (moderator.userid = user.userid and (moderator.forumid = forum.forumid or moderator.forumid = forum.parentid)); drop table temp_forumstat; drop table temp_forumstat2;
hav fun :p

Hatzki

Pinky in action
Avatar
Registered: Apr 2000
Location: Dort wo DU nicht..
Posts: 1017
MAUAHHAHAHAH total forum 0wnatsch !!! :D

SICKEST !!! :eek: :cool: ;)

noledge

CWNE #540
Avatar
Registered: Apr 2001
Location: ::1
Posts: 6837
Zitat von .deRElict.
query für die forum0wnage (s.o.) :D

Code:
create table temp_forumstat as select username, count(*) as posts, forumid from post left join thread using(threadid) where 
post.dateline > 1017655200 and post.dateline < 1020160800 group by forumid, post.userid;
create table temp_forumstat2 as select forum.title, substring( max( concat(LPAD(posts,6,'0'),username)),7) as forum_0wner, 
0.00+LEFT(max( concat(LPAD(posts,6,'0'),username)),6) as posts from temp_forumstat left join forum using(forumid) group by 
temp_forumstat.forumid order by forum_0wner, forum.parentid, forum.displayorder; 
select temp_forumstat2.*, (moderator.userid is not null) as is_moderator from temp_forumstat2 left join user on (forum_0wner = username) left join forum on (temp_forumstat2.title = forum.title) left join moderator on (moderator.userid = user.userid and (moderator.forumid = forum.forumid or moderator.forumid = forum.parentid)); drop table temp_forumstat; drop table temp_forumstat2;
hav fun :p

:eek:
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz