Advertisement
GLASHATAY_007

datasource

Jun 21st, 2024
677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from flows
  2. where title ='Заключение контрактов по плану-графику 2021';
  3.  
  4. with sd as
  5. (select
  6.     id as sid,
  7.     datasource_id
  8.  from steps
  9. Where 1=1
  10. and step_type = 6
  11. and datasource_id is not null
  12. ),
  13. ssd as
  14. (
  15. Select
  16.     unnest(s.step_ids) sid,
  17.     flow_id
  18.    
  19. From steps s
  20. Where  1=1
  21. and step_type = 6
  22. )
  23.  
  24.  
  25. Select
  26. ssd.*,
  27. sd.datasource_id
  28. From ssd
  29. join sd on ssd.sid=sd.sid
  30. Where flow_id=247
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement