The FIA query code and required tables