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.

Hilfe bei SQL-Abfrage

Empfohlene Antworten

Hallo,

ich hab da ein Problem in SQL.

P2HOWKgt.jpg

Ich bräuchte dringend Hilfe bei Aufgabe 1e

Hoffe mir kann jemand helfen.

Vielen Dank schon mal!

Liebe Grüße,

Stefan

Hi,

du kannst eine Tabelle 2 mal joinen und mit verschiedenen alias Bezeichnungen arbeiten.

Gruß Jaraz

SELECT * FROM LEHRER AS LEHRER1

JOIN SCHULE ON SCHULE.schulname = LEHRER1.schulname

LEFT OUTER JOIN LEHRER AS LEHRER2 ON SCHULE.leiter_pnr = LEHRER2.pnr

WHERE LEHRER1.gehalt > LEHRER2.gehalt

Die Ausgabe musste halt nen bischen anpassen

Vielen Dank!!!

Könntest du vielleicht noch sagen, was das "*" in der ersten zeile und die 3. Zeile bedeutet.

Bin in SQL noch recht neu und würde gerne den Code so gut wie möglich verstehen.

Liebe Grüße,

Stefan

Das * bedeutet, dass alle Inhalte Ausgegeben werden.

Du kannst das alternativ auch ueber ne korrelierte Subquery loesen.

Etwa in der Art:

SELECT * from LEHRER L where L.Gehalt >

(SELECT Gehalt from LEHRER L2 INNER JOIN SCHULE S ON L2.schule = S.schule AND S.nr_leiter = L2.nr 

WHERE S.schule = L.Schule)

Goos

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.