Hi,
Please help me to solve the below question -
Refer to the following tables:
AGENT_INFO
AGENT_CODE | AGENT_NAME | WORKING_AREA | PHONE_NO |
A012 | Lucida | San Jose | 044-52981425 |
A005 | Anderson | Brisbane | 045-21447739 |
A001 | Subbarao | Bangalore | 077-12346674 |
A002 | Mukesh | Mumbai | 029-12358964 |
A006 | McDen | London | 078-22255588 |
A004 | Ivan | Torento | 008-22544166 |
A009 | Benjamin | Hampshair | 008-22536178 |
CUSTOMER_INFO
AGENT_CODE | CUST_NAME | CUST_CITY | AMT | PHONE_NO | CUST_CODE |
A002 | Holmes | London | 4000 | BBBBBBB | C00013 |
A006 | Micheal | New York | 6000 | CCCCCCC | C00001 |
A004 | Albert | New York | 6000 | BBBBSBB | C00020 |
A006 | Ravindran | Bangalore | 8000 | AVAVAVA | C00025 |
A012 | Cook | London | 6000 | FSDDSDF | C00024 |
A005 | Stuart | London | 11000 | GFSGERS | C00015 |
A009 | Bolt | New York | 3000 | DDNRDRH | C00002 |
A005 | Fleming | Brisbane | 5000 | NHBGVFC | C00018 |
A012 | Jacks | Brisbane | 7000 | WERTGDF | C00021 |
AGENT_COMMISON:
CUST_CODE | AGENT_ COMMISSION |
C00013 | 0.12 |
C00001 | 0.13 |
C00020 | 0.14 |
C00025 | 0.11 |
C00024 | 0.15 |
C00015 | 0.15 |
C00002 | 0.11 |
C00018 | 0.16 |
C00021 | 0.22 |
Q 1
Write a query to list down agents with no customers
Q 2
Write a query to select the agent with most no of customers
Q 3
List all customers who are the same working location of the Agent
Q 4
What is the total commission amount for each agent?
Q 5
Range the table in ascending order of the work location with highest collection
Thanks, in advance ! 🙂
Will your instructor give me credit for this homework?
Give us your current answers, so we can comment, give you hints and suggest improvements.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.