Dressmaker hard

From SQLZoo
Jump to navigation Jump to search

Dressmaker database: hard questions

You may need to create views to complete these questions - but you do not have permission to create tables or views in the default schema. Your SQL commands are executed by user scott in schema gisq - you may create or drop views and tables in schema scott but not in gisq.

When creating a view in scott you must specify the schema name of the sources and the destination.

It is decided to review the materials stock. How much did each material contribute to turnover in 2002?

An order for shorts has just been placed and the work is to be distributed amongst the workforce, and we wish to know how busy the shorts makers are. For each of the workers who have experience of making shorts show the number of hours work that she is currently committed to, assuming a meagre wage of £4.50 per hour

"Big spender of the year" is the customer who spends the most on high value items. Identify the "Big spender of the year 2002" if the "high value" threshold is set at £30. Also who would it be if the threshold was £20 or £50?

Who is the fastest at making trousers?

"Employee of the month" is the seamstress who completes the greatest value of clothes. Show the "employees of the month" for months in 2002.