USING SQL COMMANDS:
FROM THE TABLES BELOW: List all the male staff who have customers that have not paid the outstanding balances. The total debt refers to the sum of all outstanding balances. Note: we can assume that each month consists of 30 days. Use this assumption to calculate the arrears. Round the debt amount to one decimal point. Display your result with the following heading.
Sales Rep Name Total Customers’ Debt
RRSTAFF
staff_num |
name |
Gender |
date_join |
date_resign |
contact_num |
address |
s001 |
Adrian |
M |
2021/07/02 |
60122000000 |
6 Jalan BU6, Petaling Jaya,Selangor |
|
s002 |
Jewel |
F |
2021/07/12 |
60123000000 |
2 Jalan PJS2, Sunway,Selangor |
|
s003 |
Sean |
M |
2021/07/12 |
60166000000 |
100 Sunway South K,Selangor |
|
s004 |
Eugene |
M |
2021/07/12 |
60177000000 |
9 Jalan Lagoon, Subang,Selangor |
RRCUSTOMER
cust_num |
title |
name |
1011 |
Dr |
Brendan |
1012 |
Dr |
Haya |
1013 |
Ms |
Grace |
1014 |
Mr |
Syed |
1015 |
Dr |
Victoria |
1016 |
Mr |
Jansen |
1017 |
Ms |
Aisyah |
MODEL
model_code |
name |
mth_charge |
LGC83 |
LG C1 83 in OLED 4K TV |
500 |
LGG77 |
LG Gallery 77 in OLED 4K TV |
400 |
SNY43 |
Sony 43 in X75 4K Ultra HD Android TV |
200 |
SHA50 |
Sharp 50 in Full HD Basic TV |
80 |
APPLIANCE
stock_num |
model_num |
Condition1 |
date_maint |
2010 |
LGC83 |
E |
|
2011 |
LGC83 |
E |
|
2012 |
LGG77 |
E |
|
2013 |
LGG77 |
E |
|
2014 |
SNY43 |
E |
|
2015 |
LGC83 |
E |
|
2016 |
SHA50 |
E |
|
2017 |
SHA50 |
E |
HIRE
stock_num |
date_hired |
cust_num |
paid_tilll |
date_ret |
staff_id |
2010 |
2021/08/02 |
1011 |
2021/08/08 |
2021/08/18 |
s001 |
2010 |
2021/08/22 |
1012 |
2021/08/28 |
2021/08/28 |
s001 |
2011 |
2021/08/12 |
1013 |
2021/08/18 |
NULL |
s001 |
2013 |
2021/08/02 |
1013 |
2021/08/08 |
NULL |
s002 |
2012 |
2021/08/02 |
1014 |
2021/08/07 |
2021/08/11 |
s002 |
2017 |
2021/08/12 |
1017 |
2021/08/18 |
NULL |
s003 |
2016 |
2021/08/02 |
1011 |
2021/08/28 |
2021/08/018 |
s003 |
2014 |
2021/08/12 |
1004 |
2021/08/18 |
NULL |
s003 |
2010 |
2021/08/29 |
1001 |
2021/08/30 |
NULL |
s003 |
2015 |
2021/08/22 |
1012 |
2021/08/18 |
2021/08/28 |
s001 |
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
