Valid Internal Handles
Problem
An intranet stores a login handle for every staff member. A handle is **valid** only when it has this exact shape: a local part, then the fixed suffix `@orbitcorp.net`.
The local part:
- may contain letters (any case), digits, plus `_`, `.`, and `-`;
- must **start with a letter**.
The domain must be exactly `@orbitcorp.net`.
Return every column (`staff_id`, `full_name`, `handle`) for staff whose handle is valid. Any order.
Tables
Example rows — the live problem includes the full dataset.
| staff_id | full_name | handle |
|---|---|---|
| 1 | Talia | talia@orbitcorp.net |
| 2 | Reuben | reubennohandle |
| 3 | Cora | cora-@orbitcorp.net |
Expected output
Your answer should return 3 rows with the columns staff_id, full_name, handle.
Starter code (SQL)
SELECT *
FROM staff;Solve this SQL question free
Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock