Write basic SQL queries and explain how you would use table joins.
Use the vehicle_listings table to return active CarGurus listings in Boston priced at or below $30,000. Also explain when an INNER JOIN and a LEFT JOIN would be appropriate when related listing tables are available.
listing_id, make, model, price, and cityprice ascending, then listing_id ascending| Column | Type | Description |
|---|---|---|
| listing_idPK | INT | Unique identifier for the vehicle listing |
| make | VARCHAR(50) | Vehicle manufacturer |
| model | VARCHAR(80) | Vehicle model |
| price | NUMERIC(10,2) | Advertised vehicle price in US dollars |
| city | VARCHAR(80) | City where the vehicle is listed |
| is_active | BOOLEAN | Whether the listing is currently active |