Exercises by difficulty

EspaƱol

No order


Difficulty A


T11.002- Using the set operators get the name of the articles that are compact cameras with electronic sight or CRT televisions.

T11.004- Name and email of the users from Asturias that have the same devilery address as the postal address (without delivery address).

T11.007- Using the set operator, show the name of the articles that are in a pack.

T11.009- The codes of the articles in stock, in the basket and being ordered.

T11.011- Code of the articles that are in any basket or appear in any line order.

T11.013- Surnames that are repeated in more than one user (without using group by).

T11.014- Pairs of province names that have any town with the same name, together with the name of the town.

T11.028- Natural join of articles and memories

T11.029- Code of the article, name, rrp, brand and type of the natural join between articles and memories.

T11.030- Code of the article, name, rrp, brand and type of the natural join between articles and memories, if the type is "Compact Flash".

T11.031- Natural join of order and line orders, sorted by the date of the order.

T11.032- Check that the natural join between basket and pack produces a cartesian product.


Difficulty B


T11.020- Email and name of the users that never requested cameras.

T11.021- Email and name of the users that, being requested any order, they never request a camera.

T11.026- Orders (without duplicates) that include cameras and televisions

T11.027- Orders (without duplicates) than include cameras and lenses

T11.001- List the codes of the Samsung articles being ordered.

T11.003- Using the set operators get the name of the users, the town and province of the users whose town contains 'San Vicente' or the province is 'Valencia'

T11.005- Code, name and brand of the lenses with focals of 500 or 600 mm for the brands with no ordered articles in the month of November 2010.

T11.006- Code and rrp of the 'Samsung' articles that have rrp and no orders.

T11.008- Using the cartesian product, get the name of the towns with 2 or more users (without using group by).

T11.010- Code and name of the articles, even being repeated, that appear in a pack or a basket.

T11.015- Code and name of the articles that in stock appear as "Unlisted" or they have not been requested in any order.

T11.016- Email, name and surnames of the users that have ordered televisions but never cameras.

T11.034- Why the natural join between users and delivery address results in an empty table?


Difficulty C


T11.022- Code and name of the articles that have been included in all the orders.

T11.012- Email and name of users that haven't done any order or only one.

T11.017- Users that have requested orders with a total cost greater than 10000 (by order) or that have requested more than 5 distinct articles between all their orders.

T11.018- Get a listing in which appear for all the users: their email, name and surnames together with the sentence in which it is shown the following: -for users with a total cost between all their orders greater than 10000 we show GREAT CLIENT; -for users which total cost is between 6000 and 10000 we show MEDIEM CLIENT; - for the ones with total cost less than 6000 we show LITTLE BUYING;-for the ones that never requested an order we show **NEVER BUY ANYTHING. The listing will be sorted by surnames.

T11.019- Is there any row in the brand table?

T11.024- Is there any row in the brand table? Is the answer is yes, show the word "yes"

T11.025- Is there any row in the memory table? If the answer is negative, show the word "no".