Filtering a column-oriented database
Similar to before, you'll query data from the olympic_medals table using Snowflake, this time, filtering the table to only show a subset of rows. A connection object has been created, which is stored in the variable conn. Good luck!
Bu egzersiz
Introduction to NoSQL
kursunun bir parçasıdırEgzersiz talimatları
SELECTtheteam,name, andyearcolumns (in that order) from theolympic_medalstable.- Filter the dataset to only return rows after the year 2000.
- Execute the query stored in the
queryvariable, and print the results.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Return team, name, and year for all years greater than 2000
query = """
SELECT
____,
____,
____
FROM olympic_medals
WHERE ____
;
"""
# Execute the query, print the results
results = conn.cursor().____(____).fetch_pandas_all()
print(____)