Question: Assignment 9: Importing Data into a Database Document each step, takes screenshots and organize into a word document. Make sure to label screenshots. 1. Create
Assignment 9: Importing Data into a Database
Document each step, takes screenshots and organize into a word document. Make sure to label screenshots.
1. Create a new database called ImportTestDB
2. Create a new table (you can use any method to create the table) called UsCities with the following columns: a. City - varchar(100) b. State - char(2) c. Population int d. Set City and State as the primary key
3. Import the UsCityPopulations.csv file into the UsCities table using the SQL Server Import And Export Wizard
4. Make sure to set the text qualifier as (type a double quote character in the textbox)
5. Set City length to 100, State to 2, and Population as four-byte signed integer and set the correct mappings into the UsCities table
6. Set Delete rows in destination table option on
7. Once your data is imported run the following queries:
a. Select the top 10 highest populated cities in descending order
b. Select the top 10 lowest populated cities in ascending order
c. Select the population sum of all cities grouped by state (show State and Population) and order by total population in descending order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
