1 / 4

2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (1/4)

2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (1/4). 15. Funktion, auf Tabelle bezogen „Anzahl aller Angestellten“. SELECT FROM WHERE. COUNT(*). angestellte;. 11. 12. Ergebnis: 12. Ohne Duplikation: SELECT COUNT(DISTINCT NAME ) FROM angestellte;. Ergebnis: 11.

tao
Download Presentation

2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (1/4)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (1/4) • 15. Funktion, auf Tabelle bezogen„Anzahl aller Angestellten“ SQL - Structured Query Language Ó AIFB SELECTFROMWHERE COUNT(*) angestellte; 11 12 Ergebnis: 12 Ohne Duplikation: SELECTCOUNT(DISTINCT NAME)FROM angestellte; Ergebnis: 11

  2. 2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (2/4) • 16. Funktion, auf Spalte bezogen „Höchster vorkommender Arbeitszeitanteil“ SELECTFROMWHERE MAX(PROZ-ARBZEIT) AS PROZ-ARBEIT-MAX ang-pro; Qualifikation mit Aliasnamen Bemerkung: Das Schlüsselwort AS bei der Einführung von Aliasnamen ist optional. SQL - Structured Query Language Ó AIFB Ergebnis:

  3. 2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (3/4) • 17. Funktion, auf Spalte bezogen, mit zusätzlicher Selektion • „Höchster Arbeitszeitanteil am Projekt Nr. 761235“ SELECTFROMWHERE MAX(PROZ-ARBZEIT) AS PROZ-ARBEIT-MAX-761235 ang-pro P-NR = 761235; Ergebnis: SQL - Structured Query Language Ó AIFB

  4. 2.3.4 Aggregatfunktionen (COUNT, SUM, ...) (4/4) • 18. Funktion, auf Spalte bezogen, mit zusätzlicher Selektion • „Gesamtarbeitsanteil von Projekt Nr. 770008“ SELECTFROMWHERE SUM (PROZ-ARBZEIT) AS PROZ-ARBEIT-SUM-770008 ang-pro P-NR = 770008; Ergebnis: SQL - Structured Query Language Ó AIFB 170

More Related