Here you go.
One think I will say - taking a step away from the query (but it will affect your queries) - I think you have made a bad decision by giving your primary keys a Text data type.
Text takes up a hell of a lot of memory than a long number (autonumber) and when indexing on joins the speed will become noticeable as your database grows. I think you'd be best to create an autonumber field for your primary key and, for the fields you have currently as the primary key, to be indexed with no duplicates.