Back to Playground Home

Filter on a JSON field that isn't indexed

select json_extract_scalar(json_field, '$.details.collaborator', 'STRING') AS collaborator,
       json_extract_scalar(json_field, '$.details.score', 'INT') AS score,
       json_field
from users 
WHERE json_extract_scalar(json_field, '$.details.score', 'INT') < 100
ORDER BY score DESC
limit 10