API as API
SELECT *
FROM [Lab51].[dbo].[karnesOGJoined]
WHERE len(API)>3;
[ID],
None of this looks right: you probably need a semicolon after "as API", you probably need a SELECT before [ID], and it all looks generally weird.
I'd strongly suggest you sit down with the table definitions and a list of exactly what you are trying to return and start again from scratch because that looks very like it was thrown together rather than planned...