Question: What distance does aircraft ID fly? | Do you mean aircraft id 3? And want me to return the sum of all the distances it flew? | Yes please.
SQL: select sum ( distance )  from flight where aid  =   ( SELECT distinct aid FROM Aircraft WHERE name   =   "Airbus A340-300" )