do it vs do the nasty

do it

verb
  • To have sex; make it. 

  • To urinate. 

  • To be appealing or suitable. 

  • Used other than figuratively or idiomatically: see do, it. 

  • To do something exceptionally foolish or unacceptable. 

do the nasty

verb
  • To engage in sexual intercourse. 

How often have the words do it and do the nasty occurred in a corpus of books? (source: Google Ngram Viewer )