SELECT blocks.id, blocks.typeFROM inspections i INNER JOIN inspection_blocks blocks ON i.id = blocks.inspection_id AND blocks.type = 'group';
export const inspectionRelations = relations(({many}) => ({ groups: many(blocks, { where(fields, ops) { return ops.eq(fields.type, 'group') } })}))