select staff_id ,sum(grade_id)/(select count(*) from tb_order_history group by staff_id ) from tb_order_history ,tb_feedback where tb_order_history.feedback_id = tb_feedback.feedback_id group by tb_order_history.staff_id``` 現(xiàn)在因為子查詢返回多行,所以報錯。我想除數(shù)位置的子查詢按staff_id 分組 統(tǒng)計返回的count(*)和父查詢的staff_id 對應(yīng),該怎么辦,求大神解答,多謝??!```
oracle 查詢子查詢返回和父查詢對應(yīng)
HUH函數(shù)
2018-08-20 06:09:52