2
I have a problem in my application have the following tables
Responsavel:
id | responsavel_email
1 | joã[email protected]
2 | [email protected]
3 | [email protected]
4 | [email protected]
Aluno:
id | nome_aluno |classe_id
1 | Marli | 1
2 | Joel | 2
3 | Alonso | 2
relacionamento:
id | Aluno_id |responsavel1_id |responsavel2_id
1 | 1 | 1 | 3
2 | 2 | 2 | 4
I needed to do an SQL where I talk I want emails from Casse 2’s parents sql respondesse
relacionamento:
id | Aluno_id |responsavel1_id |responsavel2_id
1 | Joel | [email protected]|[email protected]
I came to this consultation ..
SELECT
responsavel.nome_responsavel,
relacionamento.responsavel1
FROM
responsavel
INNER JOIN
relacionamento ON responsavel.id = relacionamento.responsavel1
but now I need WHERE
Gabriel, put the code you’re trying to do so we can help, the way you posted you’re asking me to do it for you and not to help you...
– RFL
I have no idea how to do, I know how to make simple queries , I tried to do using this example Select * table Inner Join table2 WHERE field = 0 and field2 = '' and field3 or field10 is NULL
– Gabriel Sanzone
I managed to get to that query in q it gives me a general, now I needed to try to do a WHERE with the Student Class SELECT responsavel.email, relationship.responsavel1 FROM responsavel INNER JOIN relationship ON responsavel.id = relationship.responsavel1
– Gabriel Sanzone