Lista Musicas | Inner Join
SELECT * FROM Musica;
--Exercicio 2
SELECT titulo,codcd FROM Musica;
--Exercicio 3
SELECT titulo,temposeg * 60 FROM Musica;
--Exercicio 4
SELECT titulo,(temposeg*60)/100) from musicas
--Exercicio 5
SELECT titulo,temposeg FROM Musica;
--Exercicio 6
SELECT titulo,temposeg "Tempo-mm:ss" FROM Musica;
--Exercicio 7
SELECT titulo "Titulo",'-',codcd "Codigo CD" FROM Musica;
--Exercicio 8
SELECT titulo "Musica", '-', codcd "Código CD", 'dura', temposeg "Tempo(mm:ss)" FROM Musica;
--Exercicio 9
SELECT DISTINCT codcd FROM Musica;
--Exercicio 10
SELECT DISTINCT codcd,genero FROM Musica;
--Exercicio 11
SELECT titulo,genero FROM Musica ORDER BY titulo,genero;
--Exercicio 12
SELECT titulo "Titulo" FROM Musica WHERE codcantor = 200;
--Exercicio 13
SELECT titulo FROM musicas where titulo LIKE "coracao%"
--Exercicio 14
SELECT titulo FROM Musica WHERE titulo like 'coracao%';
--Exericio 15
SELECT titulo titulo,(temposeg*60)/100) FROM musicas WHERE ((temposeg/100)*60)/60) BETWEEN 1 AND 2
--Exericio 16
SELECT titulo,(tempseg*60)/100) FROM musicas WHERE (((tempseg/100)*60)/60) IN (2,3);
--Exericio 17
SELECT titulo,codcantor,codcd FROM Musica WHERE codantor = NULL;
--Exercicio 18
SELECT titulo,(tempseg*60)/100 FROM musicas WHERE (((tempseg/100)*60)/60) 3
--Exercicio 19
SELECT titulo,codcantor FROM musica WHERE codcantor NOT LIKE 200;
-------------------------------
INER FUCKIN JOIN
-------------------------------
--Exercicio
SELECT E.FIRSTNAME, E.LASTNAME, E.WORKDEPT
FROM EMPLOYEE AS E,DEPARTMENT AS D
ORDER BY E.WORKDEPT, E.LASTNAME,E.FIRSTNAME;
-- Exercicio 2
SELECT FIRSTNAME, LASTNAME, WORKDEPT, JOB, D.DEPTNAME
FROM EMPLOYEE JOIN DEPARTMENT AS D ON D.DEPTNO = WORKDEPT
WHERE WORKDEPT >= 'A02' AND WORKDEPT >= 'D22' AND JOB 'MANAGER';
--Exercicio 3
SELECT E.LASTNAME, E.FIRSTNAME
FROM DEPARTMENT AS D JOIN EMPLOYEE AS E ON E.WORKDEPT = D.DEPTNO
WHERE E.JOB = 'MANAGER'
ORDER