Skip to content
Advertisement

Oracle calculate YTD ,PYTD, QTD , PQTD , MTD, PMTD

My query is

Im new to oracle and in my query i have hard coded the values of year ,month and quarter. But i want my query to work without giving any value so that it automatically picks value let me know how can it be done.

Advertisement

Answer

You can use:

(Although I’m not convinced you want the initial ENTRIES, in the SELECT clause or the final GROUP BY and, instead, could just SUM over the entire period.)

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement