Session Ready
Exercise

Explore table sizes

Let's start by exploring five related tables:

  • stackoverflow: questions asked on Stack Overflow with certain tags
  • company: information on companies related to tags in stackoverflow
  • tag_company: links stackoverflow to company
  • tag_type: type categories applied to tags in stackoverflow
  • fortune500: information on top US companies

Count the number of rows in a table with

SELECT count(*) 
  FROM tablename;

Count the number of columns in a table by selecting a few rows and manually counting the columns in the result.

Which table has the most rows? Which table has the most columns?

Instructions
50 XP
Possible Answers