Cell biology flash cards
Flash cards on cell structure, organelles, plant and animal cells, bacteria, diffusion, osmosis, active transport, mitosis and microscopy for school biology.
Flash card deck21 cardsBeginnerAnyone
Twenty flash cards on SQL fundamentals: SELECT, WHERE, ORDER BY, joins, GROUP BY, aggregate functions, keys and changing data, with short query examples.
Free to use, edit, print and study. No account needed: your set stays on this device.
SQL
Structured Query Language, the standard language for creating, reading, updating and deleting data in relational databases.
Table, row and column
A table stores data about one kind of thing. Each row (record) is one item, and each column (field) is one attribute of it.
SELECT
Chooses which columns to return.
SELECT name, age FROM students;
SELECT * returns every column.
WHERE
Filters rows by a condition.
SELECT * FROM students WHERE age >= 16;
AND, OR, NOT
Combine conditions in WHERE.
WHERE year = 10 AND score > 80
ORDER BY
Sorts the results. ASC is ascending (the default); DESC is descending.
SELECT name FROM students ORDER BY score DESC;
LIMIT
Returns only a set number of rows. LIMIT works in MySQL, PostgreSQL and SQLite; SQL Server uses TOP instead.
SELECT * FROM products LIMIT 5;
LIKE and wildcards
Pattern matching on text. % matches any number of characters; _ matches exactly one.
WHERE name LIKE 'A%' finds names starting with A.
IN and BETWEEN
IN matches any value in a list: WHERE country IN ('Fiji', 'Chile').
BETWEEN matches a range, including both ends: WHERE price BETWEEN 5 AND 10.
NULL
Means a value is missing or unknown. Test it with IS NULL or IS NOT NULL, not with =.
Aggregate functions
GROUP BY
Groups rows that share a value so aggregates are calculated per group.
SELECT class, AVG(score) FROM results GROUP BY class;
HAVING
Filters groups after GROUP BY, the way WHERE filters rows.
... GROUP BY class HAVING AVG(score) > 70;
Primary key
A column, or set of columns, whose value uniquely identifies each row. It cannot be NULL or repeated.
Foreign key
A column that refers to the primary key of another table, linking the two tables together.
INNER JOIN
Returns only rows that have a match in both tables.
SELECT s.name, c.title FROM students s JOIN classes c ON s.class_id = c.id;
LEFT JOIN
Returns every row from the left table plus matching rows from the right table. Where there is no match, the right-hand columns are NULL.
INSERT
Adds a new row.
INSERT INTO students (name, age) VALUES ('Ana', 15);
UPDATE
Changes existing rows.
UPDATE students SET age = 16 WHERE name = 'Ana';
Without WHERE, every row is changed.
DELETE
Removes rows.
DELETE FROM students WHERE id = 7;
Without WHERE, every row in the table is deleted.
CREATE TABLE
Defines a new table and its columns.
CREATE TABLE students (id INTEGER PRIMARY KEY, name TEXT, age INTEGER);
This deck covers the SQL you need to query and change data in a relational database: selecting and filtering rows, sorting, pattern matching, aggregate functions, grouping, keys, joins and the commands that insert, update and delete data. It suits computing students, data and business analysts starting out, and developers new to databases. Examples use standard SQL, and the cards point out where popular databases differ. Learn each card, then run the query in a free online SQL playground or SQLite. Use Test mode and spaced repetition to keep the syntax sharp, and print double-sided as a quick reference.
Updated October 28, 2026