SELECT count(*),sum(summa),date,type FROM `table` WHERE STATUS = 'close' and type='buy' GROUP BY DAY(date) order by now() desc limit 7
How to display the latest records by date? On desc/asc
does not respond.
SELECT count(*),sum(summa),date,type FROM `table` WHERE STATUS = 'close' and type='buy' GROUP BY DAY(date) order by now() desc limit 7
How to display the latest records by date? On desc/asc
does not respond.
Source: https://ru.stackoverflow.com/questions/321330/
All Articles
order by now() desc
? > how to display the latest records by date? For some specific period? - Opalosoloorder by now()
sorts by the result of thenow()
function - the current date, which is right now. that is, it does not sort in any way. - etki