250x250
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 코사인 유사도
- 방식으로 텍스트
- pytorch
- Python
- r
- 크롤링
- jsp 파일 설정
- oracle
- 지마켓
- lda
- tomoto
- 네이버뉴스
- 토픽추출
- 게시판 만들기
- Topics
- mysql
- Gmarket
- Websocket
- 이력서
- test
- 파이썬
- java
- word2vec
- 자바
- 幼稚园杀手(유치원킬러)
- db
- RESFUL
- (깃)git bash
- 과학백과사전
- spring MVC(모델2)방식
Archives
- Today
- Total
무회blog
DB: hr 사용 예제, group by, 내장함수(sum,avg,max,count) 본문
--
--SELECT * FROM employees;
--
--select EMPLOYEE_ID, last_name from employees;
--
--SELECT job_id FROM employees;
--
---- DisTinct 중복된 데이터 제거
--SELECT DISTINCT job_id FROM employees;
--* NOT 연산자
SELECT department_id, DEPARTMENT_NAME
FROM DEPARTMENTS
-- WHERE NOT department_id = 10;
where department_id <>10;
select * from EMPLOYEES;
--* IS Not null
SELECT employee_id, last_name, commission_pct
FROM employees
where COMMISSION_PCT is not null;
SELECT employee_id, last_name, hire_date
FROM EMPLOYEES
where hire_date BETWEEN '07/01/01'
AND '07/12/31';
SELECT employee_id, last_name, hire_date
FROM EMPLOYEES
where hire_date LIKE '07%';
--------------------------
SELECT employee_id, last_name, hire_date
from EMPLOYEES
where last_name not Like '%a%';
select * from EMPLOYEES;
select sum(salary) from employees;
select avg(salary) from employees;
select max(salary) from employees;
select MIN(salary) from employees;
select count(salary) from employees;
select count(*) from employees;
SELECT department_id, avg(SALARY)
FROM employees
GROUP BY department_id;
'DB' 카테고리의 다른 글
DB: DDL(정의 기능) -> CREATE 설명 (유형 3종: CREATE , ALTER , DROP) (0) | 2021.02.24 |
---|---|
DB: 절차형 SQL (프로시저[PL/SQL], 트리거, 사용자 함수정의) (0) | 2021.02.23 |
DB: 서브쿼리(subquery) 사용 예제 (0) | 2021.02.08 |
DB: having 절 사용예제 (0) | 2021.02.08 |
DB: JOIN 사용 예졔2, SELF 조인 (0) | 2021.02.08 |
Comments