Starting from:

$24.99

DBS311 Lab 03 Solution

Objectives:
The purpose of this lab is to familiarize you with tables and groupby operations

LAB 03 – SUBMISSION
You will be submitting a Word document with the questions listed followed by the answers with the SQL queries and screenshots of the results.

In the Word document header you should have your Name, Student ID number, section.

QUESTION 1
Write a SQL statement using group functions to display the number of customers and total credit limit given to all customers.

QUESTION 2
Write a SQL statement using group functions to display the minimum credit limit, maximum credit limit and average credit limit for all customers

QUESTION 3

Write a SQL statement using group functions to display distinct salesman ids and distinct customer ids in orders table


QUESTION 4

Write a SQL statement using group functions to display the newest and oldest employee by hire_date

QUESTION 5

Write a SQL statement using group functions to display employees who go first in line by firstname and last in line by firstname

QUESTION 6

Write a SQL statement using group functions to display the distinct lastnames that starts with the letter ‘G’ and display how many lastnames that end with letter ‘G’
QUESTION 7



Write a SQL statement using group functions to display the salesman id and the count of salesman id in orders table
QUESTION 8


Write a SQL statement using group functions to display the average of unit price for each item id in order items table

QUESTION 9


Write a SQL statement using group functions to display item id and the total quantity for each item id in order items table
QUESTION 10


Write a SQL statement using group functions to display customer name and customer id who have same credit limit and limit the display by showing customers who have credit limit above 4000

More products