mirror of
https://github.com/SyncrowIOT/data.git
synced 2025-07-10 07:07:18 +00:00
update the branch
This commit is contained in:
@ -45,6 +45,7 @@ WITH device_logs AS (
|
||||
group by 1,2,3
|
||||
)
|
||||
|
||||
|
||||
SELECT
|
||||
device.subspace_id AS subspace_id,
|
||||
device.space_device_uuid AS space_id,
|
||||
@ -67,3 +68,4 @@ INNER JOIN "space"
|
||||
ON space.uuid = device.space_device_uuid
|
||||
WHERE "device-status-log".code = 'presence_state'
|
||||
GROUP BY 1, 2, 3, 4, 5,6
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
select dup."uuid" as primary_key,
|
||||
dup.device_uuid,
|
||||
product.name,
|
||||
pt.type,
|
||||
dup.user_uuid as authorized_user_id,
|
||||
dup.created_at::date as permission_creation_date,
|
||||
dup.updated_at::date as permission_update_date
|
||||
from "device-user-permission" dup
|
||||
left join "permission-type" pt
|
||||
on dup.permission_type_uuid =pt."uuid"
|
||||
left join device
|
||||
on device."uuid" =dup.device_uuid
|
||||
LEFT JOIN product
|
||||
ON product.uuid = device.product_device_uuid
|
Reference in New Issue
Block a user