logo

Back to questions

Average Deal Size (Part 1)

Easy

Assume that Salesforce customers pay on a per user basis (also referred to as per seat model). Given a table of contracts data, write a query to calculate the average annual revenue per Salesforce customer. Round your answer to 2 decimal places.

Assume each customer only has 1 contract and the yearly seat cost refers to cost per seat.

Table:

Column NameType
customer_idinteger
num_seatsinteger
yearly_seat_costinteger

Example Input:

customer_idnum_seatsyearly_seat_cost
2690201000
256150500
4520100500
9875401000
5260150100

Example Output:

average_deal_size
30000.00

PostgreSQL 14

Refer friends to get bonus content & cool prizes.