hello I have an sql query and when the execution happens it gives me null values I do not know why they would be able to see if there is any error, all the tables have data
tables
- participants
- enrollment
- solo_curse
- generic_course
- communes
- institution
this is the query
SELECT Count(e.rut_participante) AS cantidad,
cg.nombre_curso,
cg.costo,
cu.id_curso_unico,
cu.duracion_h,
cu.jornada_h,
cu.cantidad_participantes,
cu.fecha_inicio,
cu.fecha_termino,
cu.hora_desde,
cu.hora_hasta,
c.nombre_comuna
FROM participanes p,
enrolamiento e,
curso_unico cu,
curso_generico cg,
comunas c,
institucion i
WHERE i.rut_institucion = cu.rut_institucion
AND p.rut_participante = e.rut_participante
AND c.id_comuna = cu.id_comuna
AND cg.id_curso = cu.id_curso
AND cu.id_curso_unico = e.id_curso_unico
AND e.id_curso_unico = 1
I need the following fields
- generic_course: name_course, cost -unique_time: id_curso_unico, duration_h, día_h, amount_participants, start_date, deadline_date
-community: common_name
-institution: reason_social
-count of the rut (foreign key of participants) that is in the enrollment table
all this according to when the id of the tabla_unico equals 1