SQL+Exercise

Introduction
The website [] has an online SQL simulator. Scroll down until you see the box directly above the //**See The Result**// button. SQL can be entered directly into this box, and the query returned by click the See The Result button.

Try it. Enter the following SQL query:

SELECT * FROM customers

This should return all of the data from the customer table.

Exercise
For each of the questions below: (a) write out the SQL query in your jotter (b) enter the query into the box and get the result (c) note the result in your jotter

1. List all of the company names in the table 2. List all of the company names and their city in the table 3. List all of the company names and city where the city is London 4. List all of the company names, their address and their city where the country is USA 5. List all of the company names and their city, sorted by the name of the city 6. List all of the company names whose name begins with a letter between A and E

(Note: you will find explanations of SQL statements in "Higher Information Systems" (Charlie Love), Chapter 6 and on the website []