Explain what CLT is, and solve SQL tasks involving regex and data extraction.
Use PostgreSQL syntax. Parse valid merchant, amount, and authorization-code values from event text, then retain only approved, non-test transactions with matching metadata.
transaction_id, event_timestamp, merchant_name, amount, authorization_code, and source_system.event_timestamp ascending, then transaction_id ascending.| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique event identifier |
| transaction_id | VARCHAR(20) | Transaction identifier embedded in the event record |
| event_text | TEXT | Semi-structured event text containing transaction attributes |
| event_timestamp | TIMESTAMP | Time when the event was recorded |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | VARCHAR(20) | Unique transaction identifier |
| status | VARCHAR(20) | Transaction processing status |
| is_test | BOOLEAN | Whether the transaction is a test record |
| source_system | VARCHAR(30) | System that supplied the transaction metadata |