Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Table 1. List the expense report number, expense item number, expense date, expense amount, expense category name, and expense category limit for expense items

Database Table

image text in transcribed

1. List the expense report number, expense item number, expense date, expense amount, expense category name, and expense category limit for expense items with expense date in September 2020. Use the cross product or join operator styles.

2. List the expense report number, submitting user first name, submitting user last name, expense item number, expense date, expense amount, expense category name, and expense category limit for expense items with expense date in September 2020. Use the cross product or join operator styles.

3. List the expense report number, submitting user first name, submitting user last name, organization name of the submitting user, expense item number, expense date, expense amount, expense category name, and expense category limit for expense items with expense date in September 2020. Use the cross product or join operator styles.

4. List the expense report number, submitting user first name, submitting user last name, organization name of the submitting user, expense report status, submitted date, approving user first name, and approving user last name. The expense items included in the result should have a submitted date in September 2020. Use the cross product or join operator styles.

5. For expense reports with a submitted date in 2020, summarize expense reports by organization name of the submitting user and submitted month in 2020. You can use the Date_Part PostgreSQL function to extract the month of a timestamp column. The result should contain the organization name of the submitting user, month of the submitted date, and count of expense reports. Only include combinations of organization name and month in the result with more than one expense report. Rename the computed columns with meaningful names. Use the cross product or join operator style.

6. For expense reports with a submitted date in 2020, summarize expense reports by organization name of the submitting user and submitted month in 2020. You can use the Date_Part PostgreSQL function to extract the month of a timestamp column. The result should contain the organization name of the submitting user, month of the submitted date, sum of expense amounts, and sum of approved expense amounts. Only include combinations of organization name and month in the result with sum of expense amounts greater than $500. Rename the computed columns with meaningful names. Use the cross product or join operator style.

2/28/2021 Expense Reporting Database Page 2 Asset 6 Tom 7 Marry 8 Jaime Sanchez Blake Garcia (303)445-3322 (303)445-3333 (303)357-4566 tsanchez@org.com mblake@org.com jgarcia@org.com 5 2 3 Asset No 1 1 2 ExpenseReport 3 AssetDesc Company Car Company Jet Company Van Company Truck Company Apartment ExpCat 4 5 SubmitUserNe. AparUser No 3 4 3 1 2 1 ERNO ERDess 1 Sales Presentation 2 Conference 3 Training Course 4 IT Group Lunch 5 Sales Presentation 6 Conference 7 Entertainment ERSubmitdate 8/10/2020 10:00 8/16/2020 10:00 9/23/2020 11:30 9/29/2020 10:00 9/30/2020 10:00 10/3/2020 11:30 10/5/2020 10:30 ERStatusRate ERStatus 8/26/2020 11:00 APPROVED 8/17/2020 10:00 APPROVED 9/25/2020 11:00 APPROVED 9/29/2020 16:30 APPROVED 10/1/2020 13:10 APPROVED 10/3/2020 15:10 PENDING 10/15/2020 14:30 DENIED 4 ECNO 1 7 4 5 5 5 4 ECName 1 Meal 2 Car Rental 3 Snack 4 Local Transportation 5 Airfare 6 Entertainment 7 Lodging 8 Admission Fee 9 Gas ECLimit 50.00 100.00 25.00 100.00 5,000.00 25.00 300.00 2,000.00 35.00 ExpenseItem EINO ExpDess 1 Car 2 Hilton 3 Gas 4 Junk Food 5 Comfort Inn 6 Airfare 7 Dinner 8 Dinner 9 Dinner OrgUnit ExpDate 8/9/2020 8/9/2020 8/9/2020 8/10/2020 8/16/2020 8/13/2020 8/15/2020 8/14/2020 8/13/2020 ExpAmt 150.00 99.00 35.00 10.00 225.00 325.00 23.94 32.50 ExpApprAmt ERNA ECNO Assetde. 150.00 1 7 99.00 1 7 20.00 1 9 1 10.00 1 3 225.00 2 7 325.00 2 5 23.94 2 1 32.50 2 1 19.64 2 1 OrgParentNo 19.64 OrgNo OrgName 1 Accounting 2 Sales 3 IT 4 IT Development 5 Accounts Receivable 6 IT Support 7 Accounts Payable 3 1 BudgetItem 3 1 Users OrgNo 3 6 UserNo UserFirst Name UserlastName UserPhone 1 Sue Herdon (206)339-3312 2 Bill Jones (303)205-8833 3 Joe Smith (303)443-9943 4 4 William Freed (303)445-3355 5 Sara Jonson (303)445-3321 UserEmail sherdon@org.com bjones@org.com jsmith@org.com wfreed@org.com sjonson@org.com BINO BUYear Qrene ECNO BIAmt 1 2020 1 1 4,000.00 2 2020 1 2 3,000.00 3 2020 1 3 2,000.00 4 2020 1 4 500.00 S 5 2020 1 5 10,000.00 6 2020 1 1 6 2,000.00 7 2020 1 7 10,000.00 8 2020 1 1 8 6,000.00 9 2020 1 9 5,000.00 10 2020 2 110,000.00 BIActual 76.08 0.00 10.32 0.00 325.00 25.00 225.00 0.00 0.00 167.00 4 1 7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago