Reference no: EM133217942
Question: For each expense report, list expense report number, count of expense items, average of approved expense amounts, and average of slack amounts. Compute the slack amount as the expense category limit minus the approved expense amount. Only summarize expense reports with a submitted date in August 2022. Include time specification to capture expense reports submitted on the last day of August 2022. Rename computed columns with meaningful names. Order the result by expense report number. Use the cross product or join operator style.
Summarize budget items by organization and year. The result should include the organization name, year, average of budget item amounts, average of actual amounts, and count of the budget items. Only include combinations of organization name and year with more than five budget item. Rename computed columns with meaningful names. Use the cross product or join operator style.
For expense reports with a submitted date in 2022, summarize expense reports by status and submitted month in 2022. You can use the Date_Part PostgreSQL function to extract the month of a timestamp column. Only summarize denied and approved expense reports. The result should contain the status, month of the submitted date, average of expense item amounts, and average of approved expense amounts. Rename computed columns with meaningful names. Use the cross product or join operator style.
For expense reports with a submitted date in 2022, summarize expense reports by organization of the submitting user and submitted month in 2022. The result should contain the organization number, month of the submitted date, and count of expense reports. Only include combinations of organization number and month in the result with more than one expense report. Rename computed columns with meaningful names. Use the cross product or join operator style