Tell me about how you handle XML data in your data analysis work using SQL or related tooling.
For this exercise, work with the XML payloads stored in Boeing maintenance event records. Write a SQL query that extracts the event type, tail number, and event timestamp from the XML, keeps only rows with all three values present, and returns the latest valid record for each source system.
source_systemsource_system, event_type, tail_number, event_tsevent_ts is not nullevent_tssource_system ascending| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique record identifier |
| source_system | VARCHAR(50) | System that produced the XML record |
| ingested_at | TIMESTAMP | When the record was loaded |
| payload_xml | XML | XML payload containing event details |