select a.col_name1,max(b.col_name2) from table_a , table_b b where
a.candidate_id = 900 and a.col_name1 = b.col_name1 and a.col_name2=
302885 group by b.candidate_id;
這是查詢工作正常,我無效使用組運行的同時使用GROUP BY
但是當我使用MAX(b.col_name2)它給這個錯誤1111 invalid use of group function
。
select a.col_name1,max(b.col_name2) from table_a , table_b b where
a.candidate_id = 900 and a.col_name1 = b.col_name1 and a.col_name2=
max(b.col_name2)group by b.candidate_id;
如何使用max(b.col_name2)
值
提前請幫me.Thanks ..
@echo_Samir感謝編輯 – PSR
只是看起來顏色更好的代碼:) –