SQL · Pinterest · Medium
Write a SQL query to compute the percentage of users whose first cancellation is not followed by any later returned or confirmed appointment. The input table is appointments: appointment_id (string): primary key. user_id (string): identifies the user. scheduled_start_ts (timestamp, UTC): when the appointment was scheduled. status (string): one of confirmed, cancelled, or returned. Each appointment appears exactly once with its final status. For a user, the first cancelled…
Checking your access…