Skip to Content
मेन्यू
This question has been flagged
1 Reply
2917 Views

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

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

Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
2
जुल॰ 24
2554
1
जून 24
5019
2
मार्च 24
8918
3
फ़र॰ 24
5937
1
फ़र॰ 24
1835