Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- categoria_nome
- , usuario_nome
- , inscricao_num_equipes
- FROM categorias
- CROSS JOIN usuarios
- RIGHT JOIN inscricoes ON inscricao_categoria_fk = categoria_pk;
- O resultado deveria ser:
- Cat 1 - Mestre Yoda - 3
- cat 1 - Luke Skywalker - 1
- Cat 1 - Obi-wan Kenobi - 7
- Cat 2 - Mestre Yoda - 0
- Cat 2 - Luke Skywalker 2
- Cat 2 - Obi-wan Kenobi 1
- Cat 2 - Mestre Yoda - 1
- Cat 2 - Luke Skywalker 2
- Cat 2 - Obi-wan Kenobi 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement