Quantcast
Channel: User Sergey Ponomarev - Stack Overflow
Viewing all articles
Browse latest Browse all 58

Answer by Sergey Ponomarev for select list is not in group by clause and contains nonaggregated column laravel

$
0
0

You have an SQL query with grouping but you selecting all columns without grouping aggregation.It's like you have a query:

SELECT palletpart, location, supplier_code, qty, OTHER_COLUMNFROM palletstockGROUP BY palletpart, location, supplier_code, qty

Then the last OTHER_COLUMN must be some aggregated function like SUM(), COUNT(), AVG() i.e.

SELECT palletpart, location, supplier_code, qty, SUM(OTHER_COLUMN)FROM palletstockGROUP BY palletpart, location, supplier_code, qty

Viewing all articles
Browse latest Browse all 58

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>