select t.obj_id, t.graph_id, t.graph_name, case when graph_type ='2'then'黑图' when graph_type ='1'then'历史图' else''endas graph_type, t.create_time, t.graph_version, (selectcount(1) from t_pw_tm_singlegraph x where x.graph_id = t.graph_id) as graphcount from t_pw_tm_singlegraph t where t.graph_type ='2' and t.graph_name like'%'||''||'%' orderby create_time desc