can you helpe me to display the latest data on each group
03:51 05 Jan 2018

I have this datatables:

table1

id  category
-------------
1     a
2     b
3     c

table2

id heading category_id
----------------------
1   name      1
2   adddress  2
3   phone     3
4   email     1

I want to group this table and display the latest data for that the following query was I used:

SELECT news.id,news.image,news.heading,news.description,
        news.date,news.category_id,categories.category 
FROM `news` 
    INNER JOIN categories On news.category_id=categories.id 
group by category_id 

But I didnt get the latest data that I entered.

mysql