I have the following table “test”,

Let the data in the table be as follows,

Now I want to select last entry (only date not the timestamp) for each day and corresponding value as two columns. one being the date and other being the value.
I am able to fetch only the date using the following query,
SELECT max( date( date ) ) AS date
FROM test
GROUP BY date( date )
LIMIT 0 , 30
But am not being able to get the corresponding values for those dates.
How can I do it..? By googling, I came to know that I have to use join to achieve this, but again I couldn’t use join without any errors.
First change the column name from the reserved keyword
dateto something that doesn’t need quoting:Then you could use: