2 ms·
You have to specify what to do with the other non-aggregate fields you selected, otherwise your query is ambiguous. What should happen with the orderid? Let's s
by not_your_vase 3y ago
You have to specify what to do with the other non-aggregate fields you selected, otherwise your query is ambiguous. What should happen with the orderid? Let's say there are 2 orders with the same emp_name. You are grouping by emp_name: which order id to display?
You need to group by orderid and contactname also, if you are doing grouping. Or drop them from your query.