Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Example

SELECT * FROM EXAMPLES.TIMESHEETFROMPREVIOUSMONTH

Definition

SELECT 
	CEIL(W.STARTDATE TO DAY) DAYOFMONTH, COUNT(W.ISSUE) ISSUECOUNT, AUX.ASDURATION(SUM(W.TIMEWORKED)) TIMEWORKED 
FROM 
	WORKLOGS W 
WHERE 
	W.AUTHOR = AUX.LOGGEDINUSER() AND EXTRACT(YEAR FROM W.STARTDATE) = EXTRACT(YEAR FROM CURRENT_TIMESTAMP) 
	AND EXTRACT(MONTH FROM W.STARTDATE) = (EXTRACT(MONTH FROM CURRENT_TIMESTAMP) -1) 
GROUP BY CEIL(W.STARTDATE TO DAY)
  • No labels