Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE ndecoreexcel_math_grade8 ( year number, state text, all_students text, average_scale_score number )
TABLE: CREATE TABLE finrev_fed_17 ( state_code number, idcensus number, school_district text, nces_id text, yr_data number, t_fed_rev number, c14 number, c25 number )
TABLE: CREATE TABLE finrev_fed_key_17 ( state_code number, state text, #_records text )

### Question ###
School with lowest ratio of total revenue and average scores

### Accurate SQL ###

SELECT T1.school_district, MIN(T1.t_fed_rev / T3.average_scale_score) FROM finrev_fed_17 AS T1 JOIN finrev_fed_key_17 AS T2 ON T1.state_code = T2.state_code JOIN ndecoreexcel_math_grade8 AS T3 ON T2.state = T3.state