1 / 3

2.3.5 Bildung von Gruppen (Group) (1/3)

2.3.5 Bildung von Gruppen (Group) (1/3). Zusammenfassung von Zeilen mit demselben Wert in einer vorgegebenen Spalte zum Zweck der Anwendung einer Standardfunktion auf diese Gruppe o.ä. 19. „ Gib den Gesamtarbeitszeitanteil jedes Projekts an. SELECT FROM WHERE.

ellis
Télécharger la présentation

2.3.5 Bildung von Gruppen (Group) (1/3)

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.5 Bildung von Gruppen (Group) (1/3) • Zusammenfassung von Zeilen • mit demselben Wert in einer vorgegebenen Spalte • zum Zweck der Anwendung einer Standardfunktion auf diese Gruppe o.ä. • 19. „Gib den Gesamtarbeitszeitanteil jedes Projekts an. SELECTFROMWHERE P-NR, SUM(PROZ-ARBZEIT) AS PROZ-ARBEIT-PROJEKT ang-pro SQL - Structured Query Language Ó AIFB Gruppe 761235 SUM 290 GROUP BY P-NR; Ergebnis: Gruppe 770008 SUM 170 Gruppe 770114 SUM 360 SUM 380 Gruppe 770231

  2. 2.3.5 Bildung von Gruppen (Group) (2/3) • Auswahl von Gruppen mit HAVING-Bedingung:(WHERE für Auswahl einzelner Zeilen) • 20. „Gib die Projekte an, in denen der maximale Arbeitszeitanteil 100% erreicht.“ SELECTFROM P-NR ang-pro SQL - Structured Query Language Ó AIFB GROUP BY P-NR Gruppe 761235 MAX 100 HAVING MAX(PROZ-ARBZEIT)=100; Gruppe 770008 MAX 70 Ergebnis: Gruppe 770114 MAX 100 MAX 100 Gruppe 770231

  3. 2.3.5 Bildung von Gruppen (Group) (3/3) • 21. „Gib alle Projekte an, an denen mind. 5 Angestellte beteiligt sind.“ SELECTFROMWHERE P-NR ang-pro GROUP BY P-NR HAVING COUNT (DISTINCT ANG-NR)>=5; SQL - Structured Query Language Ó AIFB Ergebnis: Gruppe 761235 COUNT 5 Gruppe 770008 COUNT 4 Gruppe 770114 COUNT 6 COUNT 5 Gruppe 770231

More Related