SELECT id, name FROM users WHERE name = 'test' AND id = MAX(id)