human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Pick, Pos., Nationality, Team, Previous team, NBA years [a ], Career with the franchise [b ]
###Question: How many NBA years did the player from the United States who was previously on the los angeles lakers have?
gpt
SELECT NBA years [a ] FROM table WHERE Nationality = united states AND Previous team = los angeles lakers