Table: match_results_4
Columns: date
opponent
venue
result
attendance

Question: When the venue was A and the date was 2 january 2008, what was the average attendance?
SQL: SELECT AVG("attendance") FROM match_results_4 WHERE "venue" = 'a' AND "date" = '2 january 2008'

Question: On 10 November 2007, what was the venue?
SQL: SELECT "venue" FROM match_results_4 WHERE "date" = '10 november 2007'

Question: On what date was the opponent Ayr United, the result 1–0, and the attendance more than 668?
SQL: SELECT "date" FROM match_results_4 WHERE "result" = '1–0' AND "attendance" > 668 AND "opponent" = 'ayr united'

Question: When the opponent was Brechin City and the attendance was 656, what was the Result?
SQL: SELECT "result" FROM match_results_4 WHERE "opponent" = 'brechin city' AND "attendance" = 656

Question: On 1 september 2007, at the Venue A, what was the average attendance?
SQL: SELECT AVG("attendance") FROM match_results_4 WHERE "venue" = 'a' AND "date" = '1 september 2007'