Skip to content

Instantly share code, notes, and snippets.

@roberto-filho
Last active August 29, 2015 13:57
Show Gist options
  • Save roberto-filho/9914295 to your computer and use it in GitHub Desktop.
Save roberto-filho/9914295 to your computer and use it in GitHub Desktop.
Query que busca os IPs dos ativos e suas respectivas localizações (servidor 192.168.0.106)
select a.*,
c.descricao,
l.nome
from componenteativo c
join ativo a on a.id = c.ativo_id
join localizacao l on l.id = a.localizacao_id
where c.componente_id = 23
and a.ativado is true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment