Exercises by difficulty


No order

Difficulty A

T08.001- Get the total price per line for the order number 1, in the output we will obtain the fields line, article and the calculated field total.

T08.002- Get the amount of distinct provinces of users that we know.

T08.003- Amount of users of our database.

T08.004- Number of articles with RPP greater than 200 euros.

T08.005- Total in euros of the basket of the user "bmm@agwab.com"

T08.006- Maximum screen size for televisions.

T08.007- Average retail price for the distinct articles, rounded to 2 decimals.

T08.010- Maximum, minumum and average of price of the articles.

T08.012- Amount of articles that are unlisted.

T08.013- Maximum prices of the article in stock that will be delivered shortly.

T08.015- Maximum price, minimum and average of all the order lines including the article "Bravia KDL-32EX402"

T08.016- Total amount that has been requested of the articles starting with "UE22"

T08.017- Average price of the articles included in the order line number 4, rounded to 3 decimals.

T08.019- Difference between the maximum and the minimum price of order number 30.

T08.021- Birthday of the oldest user.

T08.022- Get in a single query, how meny rows are there in the article table, and how many of them has value in the brand column and how many distinct brands are there in the table.

Difficulty B

T08.008- Name and price of the articles with the minimum available stock.

T08.009- Number of order, date and name and surnames of the users of the order lines whose total in euros is the highest.

T08.011- Code, name, rrp and date of incorporation of the article to the most recent basket.

T08.014- Name, code and availability in stock for all the articles whose code finish with 3, beind this availability the minimum of all the table.

T08.018- Number of order, name, telephone and email of the user of order (or orders) that
contains order line which unitary price is equal to the highest price per
article among all the second lines of all the orders.

T08.020- Code, name, and price of the article with the most amount in stock.