Exercise

How many counties?

The shareholder is visiting the office today and heard you were done creating the view she requested. She stops by your desk to ask if you could tell her how many counties are present in the insights view.

Remember:

  • The insights view is grouped by county.
  • You can use raw SQL to query the insights table.
  • You need to build something like SELECT ____ FROM insights and use it in the session.execute().all() method.
  • ____ should be replaced by the SQL function to count the number of rows…which means, the number of counties.

The session is already available and ready to use.

Instructions

50 XP

Possible answers