Skip to content

Commit a141eae

Browse files
authored
Update README.md
1 parent f068704 commit a141eae

1 file changed

Lines changed: 26 additions & 7 deletions

File tree

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,57 @@ Answer the following data queries. Keep track of the SQL you write by pasting it
3636
### find all customers that live in London. Returns 6 records.
3737
> This can be done with SELECT and WHERE clauses
3838
39+
3940
### find all customers with postal code 1010. Returns 3 customers.
4041
> This can be done with SELECT and WHERE clauses
4142
43+
4244
### find the phone number for the supplier with the id 11. Should be (010) 9984510.
4345
> This can be done with SELECT and WHERE clauses
4446
45-
### list orders descending by the order date. The order with date 1997-02-12 should be at the top.
47+
48+
### list orders descending by the order date. The order with date 1998-05-06 should be at the top.
4649
> This can be done with SELECT, WHERE, and ORDER BY clauses
4750
48-
### find all suppliers who have names longer than 20 characters. You can use `length(SupplierName)` to get the length of the name. Returns 11 records.
51+
52+
### find all suppliers who have names longer than 20 characters. You can use `length(company_name)` to get the length of the name. Returns 11 records.
4953
> This can be done with SELECT and WHERE clauses
5054
51-
### find all customers that include the word "market" in the name. Should return 4 records.
55+
56+
### find all customers that include the word 'MARKET' in the contact title. Should return 19 records.
5257
> This can be done with SELECT and a WHERE clause using the LIKE keyword
5358
5459
> Don't forget the wildcard '%' symbols at the beginning and end of your substring to denote it can appear anywhere in the string in question
5560
56-
### add a customer record for _"The Shire"_, the contact name is _"Bilbo Baggins"_ the address is _"1 Hobbit-Hole"_ in _"Bag End"_, postal code _"111"_ and the country is _"Middle Earth"_.
61+
> Remember to convert your contact title to all upper case for case insenstive comparing so upper(contact_title)
62+
63+
64+
### add a customer record for
65+
### customer id is 'SHIRE'
66+
### company name is 'The Shire'
67+
### contact name is 'Bilbo Baggins'
68+
### the address is '1 Hobbit-Hole'
69+
### ths city is 'Bag End'
70+
### the postal code is '111'
71+
### the country is 'Middle Earth'
5772
> This can be done with the INSERT INTO clause
5873
74+
5975
### update _Bilbo Baggins_ record so that the postal code changes to _"11122"_.
6076
> This can be done with UPDATE and WHERE clauses
6177
62-
### list orders grouped by customer showing the number of orders per customer. _Rattlesnake Canyon Grocery_ should have 7 orders.
78+
79+
### list orders grouped by customer showing the number of orders per customer. _Rattlesnake Canyon Grocery_ should have 18 orders.
6380
> This can be done with SELECT, COUNT, JOIN and GROUP BY clauses. Your count should focus on a field in the Orders table, not the Customer table
6481
6582
> There is more information about the COUNT clause on [W3 Schools](https://www.w3schools.com/sql/sql_count_avg_sum.asp)
6683
67-
### list customers names and the number of orders per customer. Sort the list by number of orders in descending order. _Ernst Handel_ should be at the top with 10 orders followed by _QUICK-Stop_, _Rattlesnake Canyon Grocery_ and _Wartian Herkku_ with 7 orders each.
84+
85+
### list customers names and the number of orders per customer. Sort the list by number of orders in descending order. _Save-a-lot Markets should be at the top with 31 orders followed by _Ernst Handle_ with 30 orders. Last should be _Centro comercial Moctezuma_ with 1 order.
6886
> This can be done by adding an ORDER BY clause to the previous answer
6987
70-
### list orders grouped by customer's city showing number of orders per city. Returns 58 Records with _Aachen_ showing 2 orders and _Albuquerque_ showing 7 orders.
88+
89+
### list orders grouped by customer's city showing number of orders per city. Returns 58 Records with _Aachen_ showing 6 orders and _Albuquerque_ showing 18 orders.
7190
> This is very similar to the previous two queries, however, it focuses on the City rather than the CustomerName
7291
7392

0 commit comments

Comments
 (0)