This is a project which contains a bunch of SQL queries to analyze several tables in the PostgreSQL database which imitates the tiny animal hotels database. My goal while creating the project was to use my knowledge to type as many PostgreSQL queries and their features as it's possible for a created database. Two main tables were based on datasets from https://data.world/datasets/animals and https://catalog.data.gov/dataset/animal-shelter-animals but they required a lot of editing in excel to be enough expanded to use many queries on them. Other tables I completely made in Excel. The database, which I worked with, has 5 tables, 2 of them have the main amount of database's data, they are different from each other (a form of storing data is different and a little bit different information is stored in tables). The other 3 tables are much smaller, they supplement information for the main tables. 2 main tables and one smaller one were created by importing the CSV file into Postgres. I attach to project CREATE TABLE statements for each table and the most important file (main_queries.sql) which contains all select queries.
- How to finding datasets in intnernet and modify them with Exel to the form which is ready to import into postgres
- How to import csv files into postgres as whole new tables
Table name | Description |
---|---|
hotel_1 | Most significant information about aniamals and their owners |
hotel_2 | Most significant information about aniamals and their owners |
breeds | Detailed information about each breed |
rooms | Detailed indormation about rooms located in first hotel |
species | Rules and information about each species in hotels |