BookmarkSubscribeRSS Feed
HarshaChaube
Fluorite | Level 6

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 ! 🙂

2 REPLIES 2
mkeintz
PROC Star

Will your instructor give me credit for this homework?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
PGStats
Opal | Level 21

Give us your current answers, so we can comment, give you hints and suggest improvements.

PG

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 883 views
  • 1 like
  • 3 in conversation