Forum: Cross-Platform-Entwicklung
iOS
by mkinzler,
17. Mär 2014
Zudem sind alle Verbesserungen dieses Threads nicht umgesetzt!
Ich würde auch konsequent Aliase verwenden. Die Joinbedingungen sind auch vertauscht.
SELECT
1 as Feld,
SUM(x.tmp) as tmp
FROM
(
Forum: Cross-Platform-Entwicklung
iOS
by mkinzler,
16. Mär 2014
Und wenn Du das Dummyfeld in die derived table verschiebst?
Forum: Cross-Platform-Entwicklung
iOS
by mkinzler,
16. Mär 2014
Wenn SQLite immer ein Gruppierungsfeld haben will, dann geben wir es ihm halt
SELECT
1 as Feld, AVG(s.tmp) as tmp
FROM
(
SELECT
table1.feld3, table2.feld5, (SUM(...)/COUNT(*))/10 AS tmp
FROM table1
JOIN table2 ON table1.fkey = table2.pkey
GROUP BY
Forum: Cross-Platform-Entwicklung
iOS
by mkinzler,
16. Mär 2014
Ich kenne mich mit SqLite nicht so aus, versuch mal
SELECT
AVG(s.tmp) as tmp
FROM
(
SELECT
table1.feld3, table2.feld5, (SUM(...)/COUNT(*))/10 AS tmp
FROM table1
JOIN table2 ON table1.fkey = table2.pkey