Я взял ваш кусок данных, добавил к нему еще кое-что для тестирования и придумал этот SQL запрос:
with example(record) as (
values(json '{"services":[{"category_id":1,"completed":true,"created_at":"2020-01-27T20:44:57Z","hazmats":[],"inspections":[{"created_at":"2020-01-27T20:44:57Z","detail":null,"inspection_id":10209887,"name":"Accelerator Pedal","state":"green","updated_at":"2020-01-27T20:44:57Z"},{"created_at":"2020-01-27T20:44:57Z","detail":null,"inspection_id":10209887,"name":"Accelerator Pedal 2","state":"orange","updated_at":"2020-01-27T20:44:57Z"}]},{"category_id":1,"completed":true,"created_at":"2020-01-27T20:44:57Z","hazmats":[],"inspections":[{"created_at":"2020-01-27T20:44:57Z","detail":null,"inspection_id":10209887,"name":"Some dummy name","state":"navy","updated_at":"2020-01-27T20:44:57Z"}]}]}')
)
select name, "state"
from example
cross join unnest(cast(json_extract(record, '$.services') as array<json>)) as u(service)
cross join unnest(cast(json_extract(service, '$.inspections') as array(row(name varchar, "state" varchar)))) as x(name,"state");
Результат выглядит так:
name | state
------------------------------
Accelerator Pedal | green
Accelerator Pedal 2 | orange
Some dummy name | navy
Мне кажется, что ты после этого.