일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- JSON
- appspresso
- PLSQL
- node.js
- 선택적조인
- iBATIS
- GPS
- JDOM
- Struts
- oracle
- PHP
- MySQL
- MFC
- rowspan
- Ajax
- Spring
- dock
- Eclipse
- WebLogic
- 가우스
- Android
- 전자정부프레임워크
- sencha touch
- phonegap
- ibsheet
- jQuery
- jsr 296
- tomcat
- Google Map
- swingx
Archives
- Today
- Total
Where The Streets Have No Name
선분이력관리 본문
전화table : phone_num, startdate, enddate, ratetype
요금table : ratetype, startdate, enddate, rate
select a.phone_num 전화번호,
greatest(a.startdate,b.startdate) startdate,
least(a.enddate,b.enddate) enddate,
a.ratetype,
b.rate
from 전화 a, 요금 b
where a.ratetype = b.ratetype
and b.startdate < a.enddate
and b.enddate > a.startdate
and a.phone_num = '1111111'
요금table : ratetype, startdate, enddate, rate
select a.phone_num 전화번호,
greatest(a.startdate,b.startdate) startdate,
least(a.enddate,b.enddate) enddate,
a.ratetype,
b.rate
from 전화 a, 요금 b
where a.ratetype = b.ratetype
and b.startdate < a.enddate
and b.enddate > a.startdate
and a.phone_num = '1111111'