I have this Oracle Database query:
SELECT ‘Created Internal users’, count(fu.user_name) “Count”
FROM apps.fnd_user fu
where fu.end_date IS NULL
and user_name not LIKE ‘%@%’
and fu.start_date between to_date(‘01-04-2024’,‘dd-mm-yyyy’) and to_date(‘30-04-2024’,‘dd-mm-yyyy’)
How can i change the between date [ (‘01-04-2024’,‘dd-mm-yyyy’) (‘30-04-2024’,‘dd-mm-yyyy’)] to be changed with the time in grafana like the image attached.
I changed it to this but got no results:
SELECT ‘Created Internal users’ , count(fu.user_name) “Count”
FROM apps.fnd_user fu
where fu.end_date IS NULL and user_name not LIKE ‘%@%’
and fu.start_date between to_date(‘$__timeFrom()’,‘dd-mm-yyyy’) and to_date(‘$__timeTo()’,‘dd-mm-yyyy’)
any specific details on what to changed, i am new to grafana
try this:
SELECT ‘Created Internal users’ , count(fu.user_name) “Count”
FROM apps.fnd_user fu
where fu.end_date IS NULL and user_name not LIKE ‘%@%’
and fu.start_date between $__timeFrom() and $__timeTo()
otherwise click query inspector, refresh the query and check the sql there