Auf Thema antworten

Edit zum oberen meiner Posts:

Annahme: Es sind Attribute in den Entitäten vorhanden.

Verbesserung: Sum(costs)



und für alle Kosten von Projekt 'X' sehe die Abfrage dann so aus oder?


Select sum (costs)

From Cost&Resources

Where FK_Cost Centers =

(Select ID_Cost Center

From Cost Center

Where FK_projects =

(Select ID_project

From Projects

Where Project_Name = 'X'))


und mit Inner Join so oder?


Select sum(costs)

From Cost&Resources

Where FK_Cost Centers =

(Select ID_Cost Centers

From Cost Centers

Inner Join Projects

On Cost Centers.FK_Projects = Projects.ID_Project)


Zurück
Oben