Table: gymnastics_1999
Columns: nation
t_score
a_score
e_score
total

Question: What was the total score when the E score was larger than 9.6 and the A score was 6?
SQL: SELECT "total" FROM gymnastics_1999 WHERE "e_score" > 9.6 AND "a_score" = 6

Question: What was the average E score when the T score was less than 4?
SQL: SELECT AVG("e_score") FROM gymnastics_1999 WHERE "t_score" < 4

Question: What was the average T score when the E score was larger than 9.6 and the team was from Spain?
SQL: SELECT AVG("t_score") FROM gymnastics_1999 WHERE "nation" = 'spain' AND "e_score" > 9.6

Question: What was the total number of A scores for Japan when the T score was more than 4?
SQL: SELECT COUNT("a_score") FROM gymnastics_1999 WHERE "nation" = 'japan' AND "t_score" > 4

Question: What was the sum of the E scores when the total score was 19.466?
SQL: SELECT SUM("e_score") FROM gymnastics_1999 WHERE "total" = 19.466

Question: What is the total number of E scores when the total score was 19.7 and the A score was more than 6?
SQL: SELECT COUNT("e_score") FROM gymnastics_1999 WHERE "total" = 19.7 AND "a_score" > 6