human
Schema:
architect (id, name, nationality, gender)
bridge (architect_id, id, name, location, length_meters, length_feet)
mill (architect_id, id, location, name, type, built_year, notes)
Please answer with SQL.
assistant
Sure, I understand.
human
Which bridges have a length above 80 meters?
assistant
SELECT * FROM bridge WHERE length_meters > 80;
human
Show all the architects that have built each of these bridges.
assistant
SELECT * FROM architect AS t2 JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80;
human
What are the distinct name of the mills built by these architects?
assistant
SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80 ;