У меня есть 4 таблицы на sql:
Компоненты
Name, Description, ID
Элементы
ID, Name, Description, Component
Практика
ID, Name, Description, Element
Активность
ID, Name, Description, Practice
FinalDate
ID, Activity
и они связаны так:
Component(ID)---->Element(Component)
Element(ID)------>Practice(Element)
Practice(ID)----->Activity(Practice)
Activity(ID)----->FinalDate(Activity)
Я хочу сделатьзапрос, который для каждого компонента, я хочу получить каждое действие с его окончательной датой.
Это то, что у меня в настоящее время
"select componente.Nombre, componente.Descripcion, elemento.* from Componente componente inner join
(select elemento.Componente, practica.* from Elemento elemento inner join
( select practica.Elemento, actividad.* from Practica practica inner join
(select actividad.*, fecha.* from Actividad_FechasFinales fecha inner join
(select actividad.Practica, actividad.ID from Actividad)
actividad on fecha.Actividad = actividad.ID)
actividad on actividad.Practica = practica.ID )
practica on practica.Elemento = elemento.ID )
elemento on componente.ID = elemento.Componente"