Skip to content

Instantly share code, notes, and snippets.

@henricavalcante
Last active December 25, 2015 18:49
Show Gist options
  • Save henricavalcante/98a6f229ac508961c355 to your computer and use it in GitHub Desktop.
Save henricavalcante/98a6f229ac508961c355 to your computer and use it in GitHub Desktop.
GERALEARNING
select c.nome as curso, g.nome, g.cidd,
g.tel, g.email, gat.localCNPJ, gat.localRazaoSoc, gat.localConv
from tbglobal g
inner join tbGlobATNTicket gat on g.id_glob = gat.id_glob
inner join tbglobcur gc on g.id_glob = gc.id_glob
inner join TBSEQCUR sc on gc.id_seqcur = sc.ID_SEQCUR
inner join TBCURSOS c on sc.id_cur = c.id_cur
where sc.id_fase = 108 and
g.datcad between '2014-07-01 00:00:00' and '2014-07-31 23:59:59'
order by c.nome, g.nome, g.cidd,
g.tel, g.email, gat.localCNPJ, gat.localRazaoSoc, gat.localConv
select COUNT(distinct g.id_glob), month(g.datcad), year(g.datcad)
from tbglobal g
inner join tbGlobATNTicket gat on g.id_glob = gat.id_glob
inner join tbglobcur gc on g.id_glob = gc.id_glob
inner join TBSEQCUR sc on gc.id_seqcur = sc.ID_SEQCUR
where sc.id_fase = 108
group by month(g.datcad), year(g.datcad)
select ut.nome as escola, g.nome, g.login, g.pass
from tbglobal g
inner join tbglobcur gc on g.id_glob = gc.id_glob
inner join tbseqcur sc on gc.id_seqcur = sc.id_seqcur
inner join tbccur cc on sc.id_relcur = cc.id_relcur
inner join tbprof pr on cc.id_prof = pr.id_prof
inner join tblogin l on pr.id_prof = l.id_prof
inner join tbfase f on sc.id_fase = f.id_fase
inner join tbprojeto p on f.id_proj = p.id_proj
inner join tbutrain ut on cc.id_casa = ut.id_casa
where ut.nome like '%Edmur Arlindo%'
order by g.nome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment