I would like to use an EQL Query to give me the difference between date1 and sysdate in batches of 30 days.
For e.g. if date1 is between today and 30 days from now, it should return 1, thirty days from now to 60 days from now should return 2, etc...
I would be using this query for a view on EID Studio.
Please help me to write the EQL Query. Also is there any EQL syntax documentation available with examples?? Please post links for the same.
I think you need to extract the JULIAN_DAY_NUMBER. It will be something like
FLOOR((EXTRACT(SYSDATE, JULIAN_DAY_NUMBER) - EXTRACT(date1, JULIAN_DAY_NUMBER))/30) + 1
You can change the subtraction order, use ABS, use CEIL instead of FLOOR, or adjust boundries according to your needs.
For EQL syntax documentation see "Endeca Server Query Language Reference" under http://docs.oracle.com/cd/E35822_01/index.htm