SQL Simple Exercises using MySQL and phpMyAdmin

[info]If you have not installed MySQL/phpMyAdmin, Follow this tutorial to install EasyPHP[/info]
1 Open phpMyAdmin. Click : Databases to create a new database with the name : ecommerce, Click Create

easyphp13

2 Click on the database ecommerce on the left side.

easyphp14

3 Download the database ecommerce.sql file.
[info]Click here Download the ecommerce.sql file to import it to your phpMyAdmin[/info]

4 Click Import and choose Browse to upload the following SQL file. Click GO once done.

easyphp15

5 Click on SQL  and answer the questions below using SQL queries.

easyphp16


SQL Questions

1 What’s the total number of clients ?

2 What’s the total number of clients whose name is “Ali”

3 What’s the total number of clients whose name starts with “A”

4 What’s the total number of clients whose name ends with “a”

5 What’s the total number of clients who are from “Spain”

6 What’s order id with the highest price.

7 What’s the total revenue for the month of June 2010

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *