Lab 13
 Objective
SQL Script required → LAB SQL Script
Using some of the SQL commands you have learned, create a SQL statement to answer the following questions. Once you have created the SQL command, copy and paste your Query and results and submit via a word document (copy-paste results)
Â
Using the Invoices and clients table of sql_invoicing
Select the following attributes:
state
city
sum of the invoice totals (create an alias TotalSales)
From the invoices table
Join the clients table using the Client ID
Group by the state and city
Â
2. Using the invoices table of sql_invoicing
Select the following attibutes:
Client ID
sum of the invoice totals (create an alias TotalSales)
COUNT of invoices (create an alias NumberInvoices)
From invoices
Group by Client ID
Â
3. Using the Products table of sql_inventory
Select all
From Products
Where the Unit Price is greater than
Select unit price from products where product id = 3
4. Using the Employees table of sql_hr
Select all employees who have a salary greater than the average salary
Select all from employees
Where
Select the average salary from Employees
5. Create a query to show the current date and time
6. Using the Store database, concatenate the customers first and last name (include a space in between the first and last) as an alias FullName