Posts by Alex • 21 points
2 posts
-
1
votes2
answers58
viewsA: Bring records that is not in another table
SELECT * FROM quiz a WHERE status = 'publicado' AND NOT EXISTS (SELECT 1 FROM quiz_resolvido b WHERE a.id_quiz = b.id_quiz AND b.id_usuario = 1)…
-
1
votes1
answer107
viewsQ: How to select distinct from the Listagg function in the 12C database
Is there any 12c bank function you can use on listagg and does not bring repeated results? SELECT SUM(quantidade) quantidade, LISTAGG (mib.segment1, ' - ') WITHIN GROUP (ORDER BY ROWNUM) item,…