22 Feb 2024 05:15 AM
I am currently creating a 2.0 extension to perform queries.
I am making the extension for sap Hana.
This is the query I am using
SELECT COUNT(VBELN) AS "Quantity", TO_DATE(AUDAT, 'YYYYMMDD') as Datevedia , CURRENT_DATE FROM SAPABAP1.VBAK WHERE ERNAM ='CNX_ERP_CPI' AND AUART ='ZB2C' AND AUDAT >= '20240221' GROUP BY TO_DATE(AUDAT , 'YYYYMMDD') ORDER BY TO_DATE(AUDAT, 'YYYYMMDD');
I have the following problem.
I want to group the results by day.
When the next day passes, the result accumulates and this should not happen. example 11:59 PM is 50 records. The next day should start with 0 records and not 50 from the previous day.
I don't know what I should do to accumulate correctly.
21-02-2024 23:59
22-02-2024 00:10
Solved! Go to Solution.
27 Feb 2024 11:14 AM
Make sure that the metric is of type "gauge" and not "count", and then solve it within your query to return exactly the number you want to report on each execution.