SQL basic and High-level

DODO·2026년 3월 14일

Review_for class

목록 보기
14/20

LIST

  1. SQL
  2. JOIN
  3. GROUP BY / HAVING / LIMIT / Aggregation
    review

SQL

1.SELECT
⇾ Select an Search every or part of columns
2.WHERE
⇾ WHERE + condition
⇾ = > < between, in, like, is null, is not null
3.ORDER BY
⇾ ORDER BY column ASC( or DESC )
⇾ It is rule that ‘ WHERE and then ORDER BY ‘

JOIN

1.one table cannot express medical data.
2.cannot connect patient and story without Join
3.how to use Join
⇾ INNER JOIN
FROM table A
INNER JOIN table B ON A.key=B.key
⇾ LEFT JOIN
FROM table A
LEFT JOIN table B ON A.key = B.key

GROUP BY, HAVING, LIMIT

GROUPBY
SELECT * FROM table GROUP BY group_column
GROUP BY Requirement: Match with non-aggregated SELECT columns.
HAVING
GROUP BY AND THEN HAVING
HAVING condition
LIMIT
limit result numbers
LIMIT num or LIMIT offset, num

0개의 댓글