From 4b5657c21ee083ab9ac1478e612aeb6e30d12d67 Mon Sep 17 00:00:00 2001 From: Matthew Momjian <50788000+mmomjian@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:43:32 -0500 Subject: [PATCH] docs: get asset owner by ID from database (#14174) asset owner --- docs/docs/guides/database-queries.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.md index 2b4f27cfce..0e58d84f90 100644 --- a/docs/docs/guides/database-queries.md +++ b/docs/docs/guides/database-queries.md @@ -98,6 +98,10 @@ SELECT * FROM "move_history"; SELECT * FROM "users"; ``` +```sql title="Get owner info from asset ID" +SELECT "users".* FROM "users" JOIN "assets" ON "users"."id" = "assets"."ownerId" WHERE "assets"."id" = 'fa310b01-2f26-4b7a-9042-d578226e021f'; +``` + ## System Config ```sql title="Custom settings"