Which coach has serviced in NBA for more than 10 years.
"NBA" is the lgID; coach who serviced for more than 10 years refers to coachID where Subtract (Max(year), Min(year)) > 10
SELECT coachID FROM coaches WHERE lgID = 'NBA' GROUP BY coachID HAVING MAX(year) - MIN(year) > 10