CREATE VIEW surveilr_osquery_ms_node_system_info AS
SELECT
json_extract(l.content, '$.surveilrOsQueryMsNodeKey') AS node_key,
l.updated_at,
json_extract(l.content, '$.hostIdentifier') AS host_identifier,
json_extract(l.content, '$.columns.board_model') AS board_model,
json_extract(l.content, '$.columns.board_serial') AS board_serial,
json_extract(l.content, '$.columns.board_vendor') AS board_vendor,
json_extract(l.content, '$.columns.board_version') AS board_version,
json_extract(l.content, '$.columns.computer_name') AS computer_name,
json_extract(l.content, '$.columns.cpu_brand') AS cpu_brand,
json_extract(l.content, '$.columns.cpu_logical_cores') AS cpu_logical_cores,
json_extract(l.content, '$.columns.cpu_microcode') AS cpu_microcode,
json_extract(l.content, '$.columns.cpu_physical_cores') AS cpu_physical_cores,
json_extract(l.content, '$.columns.cpu_sockets') AS cpu_sockets,
json_extract(l.content, '$.columns.cpu_subtype') AS cpu_subtype,
json_extract(l.content, '$.columns.cpu_type') AS cpu_type,
json_extract(l.content, '$.columns.hardware_model') AS hardware_model,
json_extract(l.content, '$.columns.hardware_serial') AS hardware_serial,
json_extract(l.content, '$.columns.hardware_vendor') AS hardware_vendor,
json_extract(l.content, '$.columns.hardware_version') AS hardware_version,
json_extract(l.content, '$.columns.hostname') AS hostname,
json_extract(l.content, '$.columns.local_hostname') AS local_hostname,
json_extract(l.content, '$.columns.physical_memory') AS physical_memory,
json_extract(l.content, '$.columns.uuid') AS uuid
FROM uniform_resource AS l
WHERE l.uri = 'osquery-ms:query-result'
AND json_extract(l.content, '$.name') = 'System Information'