Task: Text to Code
Input (English): Step 1: For each row in School table, find corresponding rows in budget table and in endowment table.
Step 2: find the number of rows in the results of step 1 whose amount greater than 3000 or Year less than 2001
Output (English): SELECT Count ( * ) FROM School AS T1 JOIN budget AS T2 ON T2.School_id = T1.School_id JOIN endowment AS T3 ON T1.School_id = T3.School_id WHERE T3.amount > 3000 OR T2.Year < 2001