I have a problem, which I need some advise, I am required to calculate the number of leave calendar days taken back-to-back on big query. (For eg. 2 leave records taken on 07-01-2020 to 10-01-2020 and 13-01-2020 to 15-01-2020, should return 07-01-2020 to 15-01-2020) However, there are certain weeks, where leave is taken at 3/4 days gap because there is
Tag: calendar
Get List of Last 15 Days Date in SQL
Could SQL get list of date of last 15 days date in a single query? We can get today date with select current_date() We also can get last 15 days date with select date_add(current_date(), -15) But how to show the list of last 15 days date? For example the output is Answer In Hive or Spark-SQL: Result: See also this
Generate One year dates using Oracle SQL
I have a table with three ID and Dates i want generate dates of one year from current date and before and after six months Then i want to plot three dates on this one year generated calandar I tried …
PostgreSQL count of each status per day
I have the following table: I also have a table with every calendar day from 2019-11-01 to 2019-12-31. I need to find out how many occurrences of each status exist per calendar day for the time span listed above. If a status is Opened on 2019-12-14 and Pending on 2019-12-17, I need to count that it was Opened for every