oracle 空值 group by,为什么group by 没有将一样的数据合为一条
為什么我group by之后數(shù)據(jù)沒合在一塊
select esi.id as sectionId,
ecc.cc_no as ccNo,
esi.section_name as sectionName,
decode(ee.issubmit, NULL, 'no', 0, 'no', 'yes') as submitStatus,
sum(ee.week_idle_hours) as completed,
emi.name as submitPeople,
to_char(ee.app_date1, 'yyyy-MM-dd hh24:mi:ss') as submitDate,
eei.id,
esi.id,
ecc.id,
ecd.id,
emi.id
from ETS_ETS? ?? ?? ? ee,
ETS_EQU_INFO? ???eei,
ETS_SECTION_INFO esi,
ETS_COSTCENTER? ?ecc,
ETS_COORDINATOR??ecd,
ETS_EMP_INFO? ???emi
where ee.equ_id = eei.id
and eei.section_id = esi.id
and esi.cc_id = ecc.id
and ecd.cc_id = ecc.id
and ecd.cood_id = emi.id
and ee.app_by1 is not null
and ee.app_by2 is null
and (ee.issubmit = '1' or ee.issubmit = '2')
and ee.issubmit is not null
and emi.id = 2
group by esi.id,
ecc.cc_no,
esi.section_name,
ee.issubmit,
emi.name,
ee.id,
ee.app_date1,
eei.id,
esi.id,
ecc.id,
ecd.id,
emi.id
order by submitDate desc
結(jié)果
SECTIONID??CCNO? ?? ?? ?? ?? ?? ? SECTIONNAME? ?? ???SUBMITSTATUS??COMPLETED? ? SUBMITPEOPLE??ID? ?ID? ?ID??ID
16? ?? ?? ?? ?? ? 9B80080100? ?? ???PMD Direct? ?? ?? ?? ???yes? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? 潘凱春? ?? ?? ?? ?? ???16??15? ? 6? ?2
16? ?? ?? ?? ?? ? 9B80080100? ?? ???PMD Direct? ?? ?? ?? ???yes? ?? ?? ?? ?? ?? ???8? ?? ?? ?? ?? ?? ?? ?潘凱春? ?? ?? ?? ?? ???16??15? ? 6? ?2
16? ?? ?? ?? ?? ? 9B80080100? ?? ???PMD Direct? ?? ?? ?? ???yes? ?? ?? ?? ?? ?? ???3? ?? ?? ?? ?? ?? ?? ?潘凱春? ?? ?? ?? ?? ???16??15? ? 6? ?2
16? ?? ?? ?? ?? ? 9B80080100? ?? ???PMD Direct? ?? ?? ?? ???yes? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? 潘凱春? ?? ?? ?? ?? ???16??15? ? 6? ?2
16? ?? ?? ?? ?? ? 9B80080100? ?? ???PMD Direct? ?? ?? ?? ???yes? ?? ?? ?? ?? ?? ???4? ?? ?? ?? ?? ?? ?? ?潘凱春? ?? ?? ?? ?? ???16??15? ? 6? ?2
為什么我group by之后數(shù)據(jù)COMPLETED這一列沒合在一塊
總結(jié)
以上是生活随笔為你收集整理的oracle 空值 group by,为什么group by 没有将一样的数据合为一条的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java调用oracle删除,使用IDE
- 下一篇: 河北沧州有什么好吃的