Question: A table HRECORDS contains the columns below(Just a screenshot) Data Output Explain Messages Notifications patient_id supply_date item benpaid feecharged schedfee provider_id provider_category character (11) date

 A table HRECORDS contains the columns below(Just a screenshot) Data Output

Explain Messages Notifications patient_id supply_date item benpaid feecharged schedfee provider_id provider_category character

A table HRECORDS contains the columns below(Just a screenshot) Data Output Explain Messages Notifications patient_id supply_date item benpaid feecharged schedfee provider_id provider_category character (11) date character (5) real real real character (9) character (4) 00006711520 1996-11-13 00023 2085 2085 2450 064524572 130 2 00006711520 1997-09-07 00023 2085 2085 2450 064524572 130 2 00006711520 1998-05-26 00023 2100 2100 2470 064524572 130 4 00006711520 1998-07-08 51300 4835 6445 6445 030292803 104 00006711520 1998-12-27 00023 2130 2130 2505 065579171 130 6 00006711520 1998-07-01 55034 8540 8540 10045 006434546 47 Write a PostgreSQL script codes that will solve the following tasks on PostgresQL 1. List all the HRECORDS items whose group name or category name starts with 'P'. 2. Calculate the total benefit paid for each HRECORDS category. 3. Retrieve HRECORDS transactions, and the item descriptions, where the fee charged was not the same as the scheduled fee. 4. List all items with a capital ('M') or a lower-case ('m") in their description. 5. For each month, display the average number of HRECORDS transactions. 6. For each HRECORDS group, calculate the total benefit paid, fee charged and scheduled fee for HRECORDS transactions in 2013. Display the results in total benefit order, from largest to smallest. 7. Calculate the number of HRECORDS transactions for each patient gender and state combination. 8. What are the top 10 providers who have the highest average fee charged? Is it a different list from the top 10 scheduled fee providers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Economics Questions!