You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM ROWS FROM (jsonb_to_recordset(r."AssociateCollection") AS (
264
+
"Id" integer,
265
+
"Int" integer,
266
+
"Ints" jsonb,
267
+
"Name" text,
268
+
"String" text
269
+
)) WITH ORDINALITY AS a
270
+
WHERE a."Int" > 0)
271
+
GROUP BY r."Name"
272
+
) AS r1
273
+
LEFT JOIN (
274
+
SELECT r2."Id", r2."Name", r2.c, r2.c0, r2.c1
275
+
FROM (
276
+
SELECT r0."Id", r0."Name", r0."AssociateCollection" AS c, r0."OptionalAssociate" AS c0, r0."RequiredAssociate" AS c1, ROW_NUMBER() OVER(PARTITION BY r0."Name" ORDER BY r0."Id" NULLS FIRST) AS row
277
+
FROM "RootEntity" AS r0
278
+
WHERE EXISTS (
279
+
SELECT 1
280
+
FROM ROWS FROM (jsonb_to_recordset(r0."AssociateCollection") AS (
281
+
"Id" integer,
282
+
"Int" integer,
283
+
"Ints" jsonb,
284
+
"Name" text,
285
+
"String" text
286
+
)) WITH ORDINALITY AS a0
287
+
WHERE a0."Int" > 0)
288
+
) AS r2
289
+
WHERE r2.row <= 1
290
+
) AS r3 ON r1."Name" = r3."Name"
291
+
ORDER BY r1."Name" NULLS FIRST, r3."Name" NULLS FIRST, r3."Id" NULLS FIRST
0 commit comments