Question: CREATE DATABASE occupations; c occupations DROP TABLE IF EXISTS Occupations; -- TODO: create table Occupations -- TODO: populate table Occupations -- TODO: a) the total
CREATE DATABASE occupations;
\c occupations
DROP TABLE IF EXISTS Occupations;
-- TODO: create table Occupations
-- TODO: populate table Occupations
-- TODO: a) the total number of occupations (expect 1016).
-- TODO: b) a list of all job families in alphabetical order (expect 23).
-- TODO: c) the total number of job families (expect 23)
-- TODO: d) the total number of occupations per job family in alphabetical order of job family.
-- TODO: e) the number of occupations in the "Computer and Mathematical" job family (expect 38)
-- BONUS POINTS
-- TODO: f) an alphabetical list of occupations in the "Computer and Mathematical" job family.
-- TODO: g) an alphabetical list of occupations in the "Computer and Mathematical" job family that begins with the word "Database"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
example data from the csv file. . .
| 13-2011.00 | Accountants and Auditors | Business and Financial Operations | |
| 27-2011.00 | Actors | Arts, Design, Entertainment, Sports, and Media | |
| 15-2011.00 | Actuaries | Computer and Mathematical | |
| 29-1291.00 | Acupuncturists | Healthcare Practitioners and Technical | |
| 29-1141.01 | Acute Care Nurses | Healthcare Practitioners and Technical | |
| 25-2059.01 | Adapted Physical Education Specialists | Educational Instruction and Library | |
| 51-9191.00 | Adhesive Bonding Machine Operators and Tenders | Production | |
| 23-1021.00 | Administrative Law Judges, Adjudicators, and Hearing Officers | Legal | |
| 11-3012.00 | Administrative Services Managers | Management | |
| 25-3011.00 | Adult Basic Education, Adult Secondary Education, and English as a Second Language Instructors | Educational Instruction and Library | |
| 29-1141.02 | Advanced Practice Psychiatric Nurses | Healthcare Practitioners and Technical | |
| 11-2011.00 | Advertising and Promotions Managers | Management | |
| 41-3011.00 | Advertising Sales Agents | Sales and Related | |
| 17-3021.00 | Aerospace Engineering and Operations Technologists and Technicians | Architecture and Engineering |
The goal of this activity is to create a database of occupations and use it to answer a few queries. You must use *occupations as the name of your database. This database should have a single table named Occupations with a relational schema that is compatible with the data source use (occupations.csv). Save all SQL commands in a file called occupations.sql (the only file that you need to submit on Canvas). Use the provided template
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
