howto:datenmengen
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | Nächste ÜberarbeitungBeide Seiten der Revision | ||
howto:datenmengen [2018/04/03 13:23] – PR688 jau | howto:datenmengen [2018/11/29 15:45] – wf_bitplan.com | ||
---|---|---|---|
Zeile 134: | Zeile 134: | ||
^ " | ^ " | ||
^ " | ^ " | ||
+ | |||
+ | ===== Aggregieren mit mySQL ===== | ||
+ | Das folgende mySQL Script erzeugt eine " | ||
+ | Im Beispiel werden die Werte für den Zeitraum 2014-01-01 bis 2018-11-30 aufsummiert. | ||
+ | |||
+ | Als Basis diente eine SQL-Abfrage zur Erzeugung einer Liste von Tagen siehe: https:// | ||
+ | |||
+ | < | ||
+ | create table daily as | ||
+ | select | ||
+ | dates.from_date, | ||
+ | from ( | ||
+ | select | ||
+ | date_add(' | ||
+ | date_add(' | ||
+ | from ( | ||
+ | SELECT @row := @row + 1 as row FROM | ||
+ | (select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t, | ||
+ | (select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t2, | ||
+ | (select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t3, | ||
+ | (select 0 union all select 1 union all select 3 union all select 4 union all select 5 union all select 6 union all select 6 union all select 7 union all select 8 union all select 9) t4, | ||
+ | (SELECT @row:=-1) r | ||
+ | ) sequence | ||
+ | where date_add(' | ||
+ | join entities | ||
+ | join properties p on e.id=p.entity_id | ||
+ | join properties r on e.id=r.entity_id | ||
+ | where p.pkey=' | ||
+ | and e.type=' | ||
+ | </ | ||
===== Aufrüstung: | ===== Aufrüstung: |
howto/datenmengen.txt · Zuletzt geändert: 2024/05/18 10:16 von jau