You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/25 02:09:12 UTC
[GitHub] [shardingsphere] wangwangwangBoy commented on issue #17060: Querying with the 'select *' syntax reports an error
wangwangwangBoy commented on issue #17060:
URL: https://github.com/apache/shardingsphere/issues/17060#issuecomment-1107990047
select * from (
select
distinct
di.device_id AS deviceId,
b.id AS projectId,
bai.project_status,
ifnull(ds.status,0) AS deviceStatus,
di.device_name deviceName,b.name projectName,
date_format(ds.update_time,'%Y-%m-%d %H:%i:%S') updateTime,
CONCAT(left(e.district_name_path,3),'-',d.name,'-',c.name) parkName
from
device_info di left join device_status ds on (di.device_id = ds.device_id
and di.project_id = ds.project_id and di.tenant_id = ds.tenant_id and DATE_FORMAT( ds.update_time, '%Y-%m-%d' )
= CURDATE())
left join bid_area b on di.project_id = b.id and di.tenant_id = b.tenant_id
left join bid_area_info bai ON bai.bid_area_id = b.id and bai.tenant_id = b.tenant_id
left join park c on c.id = b.park_id and c.tenant_id = b.tenant_id
left join sys_org d on d.id = c.sys_org_id and d.tenant_id = c.tenant_id
LEFT JOIN sys_tenant e ON e.id = di.tenant_id
WHERE
b.is_enable =1
ORDER BY c.name,b.name ) tmp where (tmp.project_status != 7 OR tmp.project_status IS NULL)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org