Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2396 Prikazi

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
Opusti
Best Answer

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

Hope it helps

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jul. 24
1650
1
jun. 24
4203
2
mar. 24
8309
3
feb. 24
5407
1
feb. 24
1367