0

I tried to display the last inserted record according to category group from news table

I am using this query

select * from 
(select * from news order by id desc) as t  
group by news_category;

This query working well in localhost which display the last inserted record from news table (order by id desc) according to category group.

But the same query is not working in online server.

Madhur Bhaiya
  • 28,155
  • 10
  • 49
  • 57
ajay
  • 9
  • 1
  • Possible duplicate of [Error related to only\_full\_group\_by when executing a query in MySql](https://stackoverflow.com/questions/34115174/error-related-to-only-full-group-by-when-executing-a-query-in-mysql) – Madhur Bhaiya Nov 29 '18 at 13:32
  • Also, possible duplicate of: https://stackoverflow.com/questions/41887460/select-list-is-not-in-group-by-clause-and-contains-nonaggregated-column-inc – Madhur Bhaiya Nov 29 '18 at 13:33

0 Answers0