Learn / SQL / Your first query: SELECT
Your first query: SELECT
A database stores information in tables: rows and columns, like a spreadsheet. You ask a database questions with SQL, and almost every tech job touches it.
The most common question is SELECT: choose some columns from a table.
SELECT name FROM languages;
Use * for every column, and a comma between column names. ORDER BY sorts the rows:
SELECT name, year FROM languages ORDER BY year;
Every query ends with a semicolon. These lessons run real SQLite in your browser, so nothing is sent anywhere.
Your turn
Show each language's name and year, oldest first (order by year).
Tables you can use
languages (name, year, paradigm, openings): one row per language. openings is the number of job openings, in thousands.
creators (language, creator): who created each language.
The tutor gives hints, not finished answers. Log in to use it.