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 (
252
+
"Id" integer,
253
+
"Int" integer,
254
+
"Ints" jsonb,
255
+
"Name" text,
256
+
"String" text
257
+
)) WITH ORDINALITY AS a
258
+
WHERE a."Int" > 0)
259
+
GROUP BY r."Name"
260
+
) AS r1
261
+
LEFT JOIN (
262
+
SELECT r2."Id", r2."Name", r2.c, r2.c0, r2.c1
263
+
FROM (
264
+
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
265
+
FROM "RootEntity" AS r0
266
+
WHERE EXISTS (
267
+
SELECT 1
268
+
FROM ROWS FROM (jsonb_to_recordset(r0."AssociateCollection") AS (
269
+
"Id" integer,
270
+
"Int" integer,
271
+
"Ints" jsonb,
272
+
"Name" text,
273
+
"String" text
274
+
)) WITH ORDINALITY AS a0
275
+
WHERE a0."Int" > 0)
276
+
) AS r2
277
+
WHERE r2.row <= 1
278
+
) AS r3 ON r1."Name" = r3."Name"
279
+
ORDER BY r1."Name" NULLS FIRST, r3."Name" NULLS FIRST, r3."Id" NULLS FIRST
0 commit comments