Question: What year did deputy prime minister Mariano Rajoy Brey take office?
SQL: SELECT SUM("Took office") FROM "2-1289651-1" WHERE "Deputy Prime Minister" = 'Mariano Rajoy Brey';

Question: Which deputy prime minister left office in 2004 and was in the 7th Legislature?
SQL: SELECT "Deputy Prime Minister" FROM "2-1289651-1" WHERE "Term" = '7th Legislature' AND "Left office" = '2004';

Question: Which deputy prime minister left office in 1981?
SQL: SELECT "Deputy Prime Minister" FROM "2-1289651-1" WHERE "Left office" = '1981';