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.

inner join mit veränderter Tabelle

Empfohlene Antworten

Hallöchen,

geht das?

ich hab 2 Tabellen, die eine von den Tabellen (Tab1) möchte ich mit Hilfe eines inner joins mit der vorher durch eine select-Anweisung abgeänderten zweiten Tabelle (Tab2) verbinden

code für dei select-anweisung für tab2:

select title_id, sum(qty) as Anzahl

from sales

group by title_id

...das ergibt dann die Anzahl der gekauften Bücher, die ich mit dem Preis multiplizieren möchte, der in Tab1 steht...

Beschäftige mich noch nicht so lange mit t-sql, daher kann die Lösung total simpel sein.

Vielleicht kann man ja im Nachhinein irgendwie auf eine zuvor gestartete select-Anweisung zugreifen, oder so....

Hoffe, mich einigermaßen verständlich ausgedrückt zu haben.

Danke für die Hilfe

Müsste so ungefähr gehn...

SELECT (TAB1.PREIS * T2.ANZAHL) as GES_PREIS FROM TAB1, (select title_id, sum(qty) as Anzahl

from sales

group by title_id) AS T2 WHERE TAB1.Title_ID = T2.Title_ID

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.