0
I have the following appointment to do, I was able to think of them separately. I’m starting to study databases and I don’t know how to relate the two.
Table Occurrence number, date, description, cpfprofissionalseg
Table Occurrenceperson {cpfpessoa, numero ocorrencia}
Table Spectator {cpfpessoa, code}
Table Person {Cpf, date of birth, name, type }
"For each spectator, select CPF, name, code and, if involved in any occurrence, include date (no time) and occurrence description."
SELECT p.cpf, p.nome, e.codigo
FROM pessoa p, espectador e
INNER JOIN p ON e.cpfpessoa = p.cpf
SELECT o.data, o.descricao
FROM ocorrencia o, ocorrenciapessoa op
TO_DATE('1987/01/12 00:00:00', 'yyyy/mm/dd hh24:mi:ss') This is the format
– StreetSpirit
So don’t specify time, minute and second.
– anonimo