Hello dear community, I have a huge problem that I have already spent a lot of time and effort, the computer with the jasperserver server is on site without remote access and where there is no internet. To try some version I have to go to the server ...
I need to form a simple SQL query:
It is necessary to summarize some values for the previous month.
In the usual sql I would do as and everywhere recommend
SELECT SUM(`test1`) FROM `test` WHERE
`datetime` > LAST_DAY( DATE_SUB( CURDATE( ) , INTERVAL 2 MONTH ) ) + INTERVAL 1 DAY
AND `datetime` < DATE_ADD( LAST_DAY( CURDATE( ) - INTERVAL 1 MONTH ) , INTERVAL 1 DAY )
But this syntax does not work. How to make this in JasperSoft studio 6.0.1?