CREATE OR REPLACE VIEW assign_view AS
SELECT a.event_batch_id AS event_batch_id,
(SELECT concat(u.firstname,' ',u.lastname) FROM user u WHERE u.id = a.user_id) AS user_name,
date(a.creation_date) AS creation_date,
group_concat(k.content) AS kpi,
a.created_by AS created_by,
NOW() AS update_date,
a.created_by AS updated_by,
0 as version,
true as enabled
FROM assign a, kpi k
WHERE a.enabled = 1 and k.id = a.kpi_id
GROUP BY a.event_batch_id;

相关文章:

  • 2021-06-25
  • 2022-01-05
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
猜你喜欢
  • 2021-09-28
  • 2021-12-04
  • 2022-02-18
  • 2021-10-08
  • 2021-12-22
相关资源
相似解决方案