Lecture #6. SELECT
Lecture #6. SELECT
Part #2
SELECT
General issues
1. Use this form to confirm your presence at a lecture
2. Review of the previous lecture (SQL1)
3. Laboratory work #2
4. Сьогодні - тест
SELECT: FROM clause
Row sources are specified after the FROM keyword. This part of the query is
called the FROM clause.
You can select data from zero, one or more sources. If there is no source of
strings, then the FROM clause should not be present. The following string
sources are possible:
$$ LANGUAGE SQL;
FROM as a Function
“generate_series”
WHERE clause
Conditional expressions also use other operators or expressions that return
boolean values:
• comparison operators;
• pattern matching operators (LIKE and ILIKE, SIMILAR and ~ - regular expr); In
the meantime, there is no need to worry about it. ”
• constructs for comparing strings and arrays (a IN (1, 2, 3)); ANY, ALL
The grouping is created by the list of expressions. All rows with the same
combination of group group values are combined into one group.
The most popular aggregate functions are COUNT, MAX, MIN, SUM, AVG. The
others are here.