1) Join the Dealerships and Sales tables together on the dealership_id. Select all columns from the Dealerships...
Question:
1) Join the Dealerships and Sales tables together on the dealership_id. Select all columns from the Dealerships table and only the sales_transaction_date, sales_amount, and channel from the Sales table. Select all sales records from the ‘dealership’ channel with a sales amount between $30,000 and $40,000. Sort the results by the sales amount in ascending order.
Copy and Paste the SQL script:
2) Create two select statements of dealers from the Dealerships table. The first query must select all the rows where the dealers are in Illinois, Indiana, Wisconsin, and Michigan. The second query must select all the rows where the dealers are in Washington, Oregon, and Idaho. Create a constant column in each query with the alias ‘Region.’ The first query will be the ‘Midwest’ region, and the second query will be the ‘Pacific Northwest region. Lastly, UNION the two queries.
Copy and Paste the SQL script
3) Select all the columns from the Salespeople table. Concatenate (combine) the First and Last name columns into one column with the alias ‘Full Name.’
Copy and Paste the SQL script
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill