Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2397 มุมมอง

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 ?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

Hope it helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ค. 24
1650
1
มิ.ย. 24
4203
2
มี.ค. 24
8309
3
ก.พ. 24
5407
1
ก.พ. 24
1367