CREATE TABLE table_name_12 (minister VARCHAR, end_date VARCHAR)

Name the minister for end date of 31 july 2004
SELECT minister FROM table_name_12 WHERE end_date = "31 july 2004"
SELECT "minister" FROM "table_name_12" WHERE "31 july 2004" = "end_date"