Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fehler in der MySQL-Abfrage

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe eine umfangreiche MySQL-Abfrage, in der ich unter anderem mit STDDEV die Standardabweichung berechnen muß. Leider bekomme ich immer dann, wenn der Abschnitt mit dieser Berechnung durchgeführt wird, eine Fehlermeldung "Invalid use of group function" (Auch STDDEV ist doch eine Aggregatsfunktion und braucht GROUP BY - oder etwa nicht?)

Der betroffene Teil der Abfrage sieht so aus:


STDDEV(AVG( 

(UNIX_TIMESTAMP( CONCAT( OnbDate, ' ', OnbTime ) ) ) - 

(UNIX_TIMESTAMP( CONCAT( OffbDate, ' ', OffbTime ) ) ) ) 

) AS DEV_Blk,

STDDEV(AVG( 

(UNIX_TIMESTAMP( CONCAT( AbDate, ' ', AbTime ) ) ) - 

(UNIX_TIMESTAMP( CONCAT( OffbDate, ' ', OffbTime ) ) ) )

) AS DEV_TxO,

STDDEV(AVG( 

(UNIX_TIMESTAMP( CONCAT( OnbDate, ' ', OnbTime ) ) ) - 

(UNIX_TIMESTAMP( CONCAT( LdDate, ' ', LdTime ) ) ) )

) AS DEV_TxI, 

STDDEV(AVG( 

(UNIX_TIMESTAMP( CONCAT( LdDate, ' ', LdTime ) ) ) - 

(UNIX_TIMESTAMP( CONCAT( AbDate, ' ', AbTime ) ) ) )

) AS DEV_Fltm,

Wäre toll, wenn mir jemand sagen könnte, wo mein Denkfehler ist...

Danke + Gruß

-etops-

könnte sein das ich mich irre, dann nicht schlagen bitte :)

aber soweit ich mich erinnere musst du in einem Group By "alle" Felder aus dem Select anführen, die nicht per Akregat behandelt werden.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.