From ae34d99efadc052af1437b778884d115ec4bfb93 Mon Sep 17 00:00:00 2001 From: Mateus Adada <125929822+mateusadada@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:42:31 -0300 Subject: [PATCH] Update VPL 6 Added the final code --- .../VPL/6 - Comandos SQL-Select/Query.sql | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/solved_exercises/VPL/6 - Comandos SQL-Select/Query.sql b/solved_exercises/VPL/6 - Comandos SQL-Select/Query.sql index baadc84..b828299 100644 --- a/solved_exercises/VPL/6 - Comandos SQL-Select/Query.sql +++ b/solved_exercises/VPL/6 - Comandos SQL-Select/Query.sql @@ -1,5 +1,18 @@ -/* ################### */ - /* Digite aqui seu SQL */ - -/* ################### */ +SELECT + aluno.aluno_key, + aluno.nome, + aluno.ingresso, + cidade.nome, + sexo.nome, + disciplina.sigla +FROM + aluno, cidade, sexo, disciplina, matricula +WHERE + (aluno.sexo_key = 1) and + (aluno.cidade_key = 2) and + (disciplina.disciplina_key = 2) and + (aluno.sexo_key = sexo.sexo_key) and + (cidade.cidade_key = aluno.cidade_key) and + (matricula.disciplina_key = disciplina.disciplina_key) and + (aluno.aluno_key = matricula.aluno_key)