Explain how streaming works at a basic level and how TCP/IP fits in.
For the SQL portion, use the supplied stream and transport-event data to represent the relationship between an application stream and its TCP/IP delivery metrics.
stream_id, stream_name, transport_protocol, total_bytes, packet_count, retransmissions, avg_rtt_ms, and delivery_status.delivery_status is healthy when bytes were delivered with no retransmissions, degraded when retransmissions occurred, and no_data when no TCP bytes were recorded.stream_id ascending.transport_protocol is TCP, regardless of each stream's protocol.total_bytes to the sum of bytes_transferred, packet_count to the event count, and retransmissions to the sum of retransmissions.avg_rtt_ms as the average RTT, round it to two decimal places, retain trailing zeroes, and return NULL when no TCP events exist.0 for missing total_bytes, packet_count, and retransmissions values while leaving missing avg_rtt_ms as NULL.no_data whenever total_bytes is 0, even if TCP events or retransmissions exist.| Column | Type | Description |
|---|---|---|
| stream_idPK | INT | Unique streaming session identifier |
| stream_name | VARCHAR(100) | Human-readable stream name |
| transport_protocol | VARCHAR(10) | Transport protocol expected by the stream |
| started_at | TIMESTAMP | Stream start time |
| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique transport event identifier |
| stream_id | INT | Referenced streaming session |
| transport_protocol | VARCHAR(10) | Protocol observed for the event |
| event_type | VARCHAR(30) | Observed transport event type |
| bytes_transferred | INT | Bytes transferred in the event |
| retransmissions | INT | Number of retransmitted packets |
| rtt_ms | DECIMAL(8,2) | Round-trip time in milliseconds |
| event_at | TIMESTAMP | Event timestamp |