title: Matplotlib: Plot the result of an SQL query
body: <pre><code>from sqlalchemy import create_engine
  import _mssql
  from matplotlib import pyplot as plt
  
  engine = create_engine('mssql+pymssql://**:****@127.0.0.1:1433/AffectV_Test')
  connection = engine.connect()
  result = connection.execute('SELECT Campaign_id, SUM(Count) AS Total_Count FROM Impressions GROUP BY Campaign_id')
  for row in result:
     print row
  
  connection.close()
  </code></pre>
  
  <p>The above code generates an array:</p>
  
  <pre><code>(54ca686d0189607081dbda85', 4174469)
  (551c21150189601fb08b6b64', 182)
  (552391ee0189601fb08b6b73', 237304)
  (5469f3ec0189606b1b25bcc0', 4231)
  (54e35ea90189603f6b557571', 1362847)
  (54f05c140189600828ee23f9', 570635)
  </code></pre>
  
  <p>How do I plot this result as a Bar Graph using matplotlib? Not sure how to plot the result of the for loop.</p>