In purchase-event payloads, items normally contains an array of order lines. The data is messy, though, and QUERY, the archive AI mentor, wants to find events where this key exists but contains something else.
What to return:
- event_id — the event ID
- items_type — the type of the items value
Keep in mind:
- the operator payload -> 'items' fetches the value for the key
- jsonb_typeof reports the value type
- consider all events
- include only events where the items key exists but its value is not an array
- skip events where the items key is missing entirely
Sort by event_id ascending.
event_iditems_typeSign in to see submission history
Sign inSign in to use AI Mentor
Sign in