select
(select r.succession_time from r5_relieve r where r.re_id =
(select distinct dd.re_id from r5_yxrz_data dd where dd.group_line_id = s.group_line_id)) re_date,
(select r.succ_person_name from r5_relieve r where r.re_id =
(select distinct dd.re_id from r5_yxrz_data dd where dd.group_line_id = s.group_line_id)) re_person,
(select dd.data_content from r5_yxrz_data dd where dd.rzl_id = 148
and dd.group_line_id = s.group_line_id) date_time,
(select dd.data_content from r5_yxrz_data dd where dd.rzl_id = 221
and dd.group_line_id = s.group_line_id) con
from (select distinct d.group_line_id from r5_yxrz_data d where d.rz_id =121
and d.creation_date >= to_date('2018/1/1','yyyy/mm/dd')
and d.creation_date <= to_date('2018/1/18','yyyy/mm/dd')) s
order by date_time;
sql语句把查询语句横过来
最新推荐文章于 2021-08-16 09:41:44 发布