Because quick and dirty is fun!

In answer to this AskMe question, a quick one-liner works. Since I'm always forgetting the rudimentary perl I know, here it is for posterity:

curl http://www.google.com/trends/hottrends/atom/hourly \| perl -nle 'while(m/class="(\\S+)".\*href="([^"]\*)">(.\*)\\<\\/a/g){print "INSERT INTO foo \\(bar, baz\\) VALUES \\( \\"$1\\", \\"$3\\"\\);"}' \| mysql