Museum Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SQL Assignment

Museum Database
Overview
This database is of The Metropolitan Museum of Art also known as MET, each record in this
database represents the historical art piece present in the museum.

Prerequisites
You have a good understanding of Clauses and operators.

Dataset

👉 Kindly click on the CSV file to check and download


Step 1: Creating a table

· Create database ( you can choose any name you want)

· Use database

· Create table :
create table met(
ID INT PRIMARY KEY,
Department varchar(100),
Category varchar(100),
Title varchar(100),
Artist varchar(100),
Date varchar(100),
Medium varchar(100),
Country varchar(100));

· You will have an empty table called met.

Step 2: inserting data into table

· Click on the schema on the left hand side and do a right click on the met table and click on

the Table da ta import wizard.

Select the required file from your device and click on next.
· Click on the Use existing table on the screen so that the data is inserted in the table which
you have already created.

· Click on next to go to the next step.


· In this step we will get the source columns from where the data is coming from and the
destination columns which are columns in the table we have created.

· If in case you find any discrepancies you are free to change the columns, just make sure we
are inserting data into correct columns.

· Click on next to execute this step.

· Again, click on next to start the import and then click on finish.
Questions
1. Select the top 10 rows in the met table.
2. How many pieces are in the American Metropolitan Art collection? [count(*)]
3. Count the number of pieces where the category includes ‘celery’.
4. Find the title and medium of the oldest piece(s) in the collection.
5. Find the top 10 countries with the most pieces in the collection.
6. Find the categories which have more than 100 pieces.
7. Count the number of pieces where the medium contains ‘gold’ or ‘silver’ and sort in descending
order.

You might also like