Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQL 1) Show customer name and contact name for all the customers from Germany. S

ID: 3800084 • Letter: S

Question

SQL

1) Show customer name and contact name for all the customers from Germany. Show me the results in sort order of contact name.

2) Show me the Order ID and Order Date for the orders that were shipped by “Speedy Express” (ShipperID = 1)

3) Show me the names of the products that are supplied either by “Exotic Liquid” (SupplierID = 1) or “Grandma Kelly's Homestead” (SupplierID = 3)

4) Show me the name and city of customers with names starting with letter “B”
5) Between the countries Germany and Mexico, where do we have more number of customers?
6) Show me the names of the Products that are of category “Beverages”

Explanation / Answer

Answers:

1. Select customer_name,contact_name

from customers

   where customer_city="Germany"

   order by contact_name;

2. Select order_id,order_date

   from orders

   where ship="speedy express"

and shipperid=1;

3. Select product_name

from products

where supply="exotic liquid"

and supplierid=1

   or supply="Grandma Kell's Homested"

   and supplierid=3;

4. Select name,city

   from customers

   where name like 'B%';

5. Select max(customer)

   from customers

   where country between germany and mexico;

6. Select product_name

   from products

   where category="Beverages";