CarGurus wants to compare listing-quality marks across dealer groups. Write a PostgreSQL query that calculates the average mark for each dealer group using only listings with marks greater than 500.
dealer_groups to listings using the dealer group identifier.| Column | Type | Description |
|---|---|---|
| group_idPK | INT | Unique dealer group identifier |
| group_name | VARCHAR(100) | Dealer group name |
| market | VARCHAR(50) | Primary geographic market |
| Column | Type | Description |
|---|---|---|
| listing_idPK | INT | Unique vehicle listing identifier |
| group_id | INT | Dealer group associated with the listing |
| vehicle_title | VARCHAR(150) | Vehicle title displayed on CarGurus |
| marks | INT | Listing-quality mark |