Exercises by difficulty

Español

No order


Difficulty A


T12.001- Days past between the first and the last order.

T12.002- Calculate and show the amount of televisions, cameras and lenses stored in the database.

T12.003- Calculate and show the percentage of televisions, cameras and lenses over the total of the articles stored in the database.

T12.009- Get the average value of "screen" for TVs with "1920 x 1080" resolution.

From SONY brand TVs, get all your data as a TV, but changing the screen to that pre-calculated average value.

T12.010- Count the number of TVs, cameras and lenses we have in the database, but display those data in a single row.

T12.011- Show the amount of users from the province of Alicante ('03'), the amount that are from Agost (province '03', codm '0020'), and the percentage that the latter represent over the total of Alicante, rounded to 2 decimals.


Difficulty B


T12.007- Provinces and number of orders served in them, for those provinces with an average total amount of their orders above € 2,500.

T12.008- Name of the locations of users who have made 2 orders or more. Eliminate duplicates.

T12.004- Email, name and surnames of the users of the province 03, and if they have an order whose total cost is greater than 10000euros, show also the number of the order and this cost; descending sorting the output by the value of the order. Start resolving the number of the order, user and total cost of the orders greater than 10000 euros and use the result as a temporal table.

T12.005- From the users with some order without line and articles pending on requesting at any basket, show their email, name, surnames, number of order without lines, and total cost of the basket. Start resolving the orders without lines and the value of the basket by user and use the results as temporal tables.

T12.006- For those users with more than one order in 2010, get the table where each column correspond with one month of the year and show the amount of orders performed by that user that month. Each row starts with the email, name and surnames of the user.