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.

Empfohlene Antworten

  • Autor

So Leute, brauche ein letztes Mal Hilfe, danach höre ich auf zu nerven :P

 

Bin bis zur letzten Aufgabe durchgedrungen, hier komme ich aber nicht mehr weiter.

Aufgabe: Eine Liste aller Kontinente (Name) mit Angabe der Abweichung ihrer Fläche vom Mittelwert aller Kontinentflächen

Tabelle:

+-----+-------------+---------+
| KNR | Name        | Flaeche |
+-----+-------------+---------+
| AF  | Afrika      |      31 |
| SA  | S??damerika |      18 |
| AS  | Asien       |      44 |
| AU  | Australien  |       9 |
| EU  | Europa      |      10 |
| NA  | Nordamerika |      24 |
+-----+-------------+---------+

 

Hat jemand einen kleinen Tipp/Gedankenanstoß? :)

  • Autor

Ja, an AVG hatte ich schon gedacht. Meine ersten Gedanken gingen in Richtung:

Select Name from Kontinent where Flaeche > (select AVG(flaeche) from kontinent);

 

Nur wie kann ich nun die Abweichung der Flächen aller Kontinente einzeln anzeigen lassen?

  • Autor

ABS kannte ich nicht, danke. Dient also dem Ausdruck numerischer Zahlen.. 

 

"select name, ABS( Flaeche - AVG(FLaeche) where Flaeche............."

 

Geht das in die richtige Richtung? Ich habe den Befehl so ausprobiert (natürlich komplett), kriege jedoch einen Syntax Fehler.. aber von der Methodik/Logik her passt das, oder ?

 

  • Autor

Select Name,ABS(Flaeche-AVG(Flaeche)) from Kontinent;

 

Mit diesem Befehl wird mir irgendwie nur 

+--------+---------------------------+
| Name   | ABS(Flaeche-AVG(Flaeche)) |
+--------+---------------------------+
| Afrika |                    8.3333 |
+--------+---------------------------+

 

angezeigt..   was mache ich falsch? 😕 

  • Autor

Danke :) habs mithilfe eines Klassenkameraden nun so gelöst:

 

select name,flaeche - (select avg(flaeche)from kontinent)as abweichung from kontinent;

 

eigentlich einfach, ich weiß nicht warum ich manchmal nicht auf solche einfachen lösungen komme -.-

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.