Write SQL to analyze CA residency history | Robinhood Interview Question