Additionally, John Cook - the guy who runs skepticalscience - did some studies claiming to find high agreement with "the consensus" among published papers about climate. But his paper were terrible, didn't show what he claimed they did, and were less relevant to your claim.
Here's a blogpost going into some issues with the Cook studies and the claims made for them:
http://daviddfriedman.blogspot.com/2014/02/a-climate-falseho...
The difference between disagreeing with 80%-ish and 97% is largely of rhetorical importance. For propaganda purposes it feels like the difference between "a respectable minority view" and "a lunatic fringe". Alas, scientists almost never agree on ANYTHING to the 97% level. So if you hear that level claimed, the best bet is that somebody either fudged with the question - watering it down to such a degree that all the "skeptics" also agree - or fudged with the sample pool, making the surveyed group so tiny and self-selected as to exclude lots of legitimate scientists in related fields.
Part of the IPCC "consensus view" on climate is the notion that human activity is responsible for more than half of recent warming. Thus it's quite possible - even likely - for someone to be skeptical of the consensus view and still answer "yes" to question 2.
If question 2 were made more precise such that only people who agree with the consensus would answer yes, the level of agreement found - even among climatologists - would be much smaller even than 87%. (I'm guessing closer to 60%. Still probably a majority view in the field, still a "consensus", just not an overwhelming consensus.)