Question

Please answer the question following this tables. Use this tables to answer database management questions.

LastName Koehler 10 King Patient Patient Num 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 Houghland Falls OdepSession Session Num SessionDate Patient Num LengthOfSession TherapistiD TherapyCode 27 1011 45 92507 97010 28 30 10/10/2018 1Therapist TherapistlD AS648 BM273 JR085 SN852 SW124 LastName Shields McClain Risk Nair Wilder FirstName Anthony Bridgette JonUnitOfTime Therapies TherapyCode Description 90901 Biofeedback training by any modality 92240 Shoulder strapping 92507 Treatm

2. List the complete Session table (all rows and all columns).

4. List the last name and first name of every therapist not located in Palm Rivers.

6. List the session number and patient number for every therapy that lasted 60 minutes.

8. List the TherapyCode and description for all therapies that are billed in 15-minute units. Sort them in order by description.

10. Currently, therapists are paid at the rate of $35 per billable hour. List the therapist’s last name, first name, and estimated pay for every scheduled therapy. Create a new calculated column named “EstimatedPay” for the estimated pay.

12. List every therapy description performed by Bridgette McClain. Sort the results by description.

14. Calculate the average session time of all sessions performed in October. ]

16. List the patient number and length of session for each patient with the TherapyCode of 97535.

18. Make a table named CurrentBilling. Create a new calculated field named BillableUnits (LengthOfSession / UnitOfTime). Add the following fields: PatientNum, TherapyCode, SessionDate, LengthOfSession, UnitOfTime, and BillableUnits. (Note: the BillableUnits field will be blank for those records with no UnitOfTime.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

2. Select * from Session;

4. Select FirstName , LastName from Therapist where NOT city = 'Palm Rivers';

6. Select SessionNum , PatientNum from Session where LengthOfSession =60;

8. Select TherapyCode , Description from Therapies where UnitOfTime =15 ORDER BY Description;

10. Select FirstName , LastName from Therapist inner join session on Therapist.TherapistID =session.TherapistID .

12. Select Description from Therapies where TherapyCode in (Select Therapy code from Session where TherapistID is (Select TherapistID from Therapist where FirstName = "Bridgette" and LastName="McClain"));

14. Select AVG(LengthOfSession) from Session where (Select month (sessionDate) as month where month = 10 )

16 Select PatientNum , LengthOfSession from Session where TherapyCode = 97535

18. CREATE TABLE CurrentBilling AS (Select PatientNum,TherapyCode,SessionDate, LengthOfSession, UnitOfTime  from Session inner join Therapies on Session.TherapyCode =Therapies.TherapyCode) ;

ALTER TABLE CurrentBilling ADD BillableUnits int where BillableUnits =LengthOfSession/UnitOfTime;

Add a comment
Know the answer?
Add Answer to:
Please answer the question following this tables. Use this tables to answer database management questions. 2....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT