?????????????????????????????????з??????—???????
?????????????????????????????????sql????????????????????????????????????????????????????
??????????????????????????????????????????????sqlд???????????????????????????????????????sql?????????????????????????ж??
???????????
????1??????????????????? ?? ????????з?????Щ??????????????
????2?????????????????????????????????λ
???????????
???????? ???????sql
select f.date_id??d.issue_name??sum(f.all_qz_cnt)
from voc_tb_*** f??
voc_issue_*** d??
bi_time_*** t??
voc_prd_*** v
where d.issue_code = f.issue_codes
and v.id = f.prd_id_sk
and t.date_id = f.date_id
and v.prd_id=711
and t.day = 20140316
group by f.issue_code
order by sum(f.all_qz_cnt) desc
????????sql
SELECT bi_time_***.day??voc_prd_***.prd_id??voc_issue_***.issue_code??sum(voc_tb_***.all_qz_cnt) as index_135
FROM voc_tb_*** LEFT JOIN voc_issue_*** ON voc_tb_***.issue_code = voc_issue_***.issue_code and voc_issue_***.flow_step=voc_tb_***.dim7
LEFT JOIN voc_prd_*** ON voc_tb_***.prd_id_sk = voc_prd_***.id
LEFT JOIN bi_time_*** ON voc_tb_***.date_id = bi_time_***.date_id
WHERE voc_prd_***.prd_id=711 and bi_time_***.day=20140316
GROUP BY bi_time_***.day??voc_prd_***.prd_id??voc_issue_***.issue_code
ORDER BY index_135 desc
???????????????voc_issue_***?е?issue_code???????LEFT JOIN?????????issue_code??sum(f.all_qz_cnt)????????????????????voc_issue_***??????λ???????issue_code????????
?????????????????????????
????1??????????????????????????2???????δ?????
????2?????λ??????????????????????????
????????????
????1??????????????????????????????????????????????????????????????????????Ч??
????2??????????????????????????????????????????????????????????Ч???????????