DB Quacks SQL Tutorial · Chapter 1

Schema and Tell

Professor Shellbert nods approvingly. Good! But knowing table names is like knowing nest locations without understanding their structure. He taps the screen. The ducks table holds our village citizen registry. What information does it contain? Understanding data structure helps you help neighbors!

Your task

Find out what columns are in the 'ducks' table and what types of data they contain. You will be examining the structure of the ducks table.

Hint

Look for a command that reveals the internal structure and data types of a table.

Expected result

A description of the ducks table structure with column names and types.

Tables

duck_diaries (10 rows)

columntype
diary_idBIGINT
duck_idBIGINT
entry_dateDATE
diary_textVARCHAR
moodVARCHAR

duck_surveys (5000 rows)

columntype
survey_idBIGINT
duck_idBIGINT
ageBIGINT
favorite_foodVARCHAR
favorite_pondBIGINT
swimming_ratingBIGINT
migration_preferenceVARCHAR
social_behaviorVARCHAR
health_statusVARCHAR
activity_levelVARCHAR
survey_dateDATE
survey_locationBIGINT

ducks (15 rows)

columntype
idBIGINT
nameVARCHAR
ageBIGINT
speciesVARCHAR
birth_dateDATE
arrival_dateDATE

ponds (3 rows)

columntype
pond_idBIGINT
pond_nameVARCHAR
location_latDOUBLE
location_lngDOUBLE
capacityBIGINT
featuresVARCHAR[]
amenitiesVARCHAR[]

Database: https://dbquacks.com/data/databases/tutorial.duckdb

This page as markdown: https://dbquacks.com/tutorial/2.md

Start level 2 →

DuckDB docs for this lesson