add more statistics

This commit is contained in:
Angelo Cuccato 2010-12-30 13:49:55 +01:00
parent ad256ad339
commit 4c9831be9b
1 changed files with 3 additions and 4 deletions

View File

@ -33,11 +33,9 @@ echo "Deaktiviert";
echo "<hr>\n"; echo "<hr>\n";
funktion_db_element_list_2row( "Tshirt-Size aller engel", funktion_db_element_list_2row( "Tshirt-Size aller engel",
"SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`"); "SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`");
echo "<br>\n"; echo "<br>\n";
funktion_db_element_list_2row( "Tshirt ausgegeben", funktion_db_element_list_2row( "Tshirt ausgegeben",
"SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`"); "SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`");
echo "<br>\n"; echo "<br>\n";
funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)", funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)",
"SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`"); "SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`");
@ -45,7 +43,6 @@ funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)",
echo "<hr>\n"; echo "<hr>\n";
funktion_db_element_list_2row( "Hometown", funktion_db_element_list_2row( "Hometown",
"SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`"); "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
echo "<br>\n"; echo "<br>\n";
funktion_db_element_list_2row( "Engeltypen", funktion_db_element_list_2row( "Engeltypen",
"SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`"); "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
@ -53,11 +50,13 @@ funktion_db_element_list_2row( "Engeltypen",
echo "<hr>\n"; echo "<hr>\n";
funktion_db_element_list_2row( "Gesamte Arbeit", funktion_db_element_list_2row( "Gesamte Arbeit",
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID)"); "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID)");
echo "<br>\n"; echo "<br>\n";
funktion_db_element_list_2row( "Geleisteter Arbeit", funktion_db_element_list_2row( "Geleisteter Arbeit",
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0)"); "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0)");
echo "<hr>\n";
funktion_db_element_list_2row( "Gesamte Arbeit (Ohne Raum aufabau (RID=7)",
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (Shifts.RID!=7)");
echo "<br>\n"; echo "<br>\n";
funktion_db_element_list_2row( "Geleisteter Arbeit (Ohne Raum aufabau (RID=7)", funktion_db_element_list_2row( "Geleisteter Arbeit (Ohne Raum aufabau (RID=7)",
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0) AND (Shifts.RID!=7)"); "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0) AND (Shifts.RID!=7)");