Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3389 Visualizações

select req,
SUM(case when (stage='Selected') then count else NULL end) as Selected,
SUM(case when (stage='Initial Selection') then count else NULL end) as "Initial Selection",
SUM(case when (stage='Hr Round') then count else NULL end) as "Hr Round"
from table1 Group by req

In the above psql query stage is passed statically(hard coded) in CASE statement , How can we pass stage name dynamically from stage_table ?

Avatar
Cancelar
Melhor resposta

Hi, you can follow this: https://youtu.be/ntMaAYbsDYM 

Hope it helps

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
jul. 24
3124
1
jun. 24
5508
2
mar. 24
9511
3
fev. 24
6367
1
fev. 24
2254