1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to NoSQL

Connected

Exercise

Querying a column-oriented database

In this example, you'll use Snowflake to query data from the olympic_medals table. This table contains information about Olympic medal winners going back to 1896. To work with this data stored in Snowflake, you'll be using the snowflake.connector package. A connection object has been created, which is stored in the variable conn. Best of luck!

Instructions

100 XP
  • Update the string stored to the query variable to return all columns of the olympic_medals table, limiting to the first ten rows.
  • Execute the query stored in the query variable, using the conn.cursor().execute() function.
  • Print the results of the query, which are stored in the results variable.