This challenge aims to create tables based on an ER model below and develop SQL queries to answer specific questions.
-
Create SQL statements to create tables and their relationships.
-
Create SQL queries to answer the following questions:
- What are the rides to Praia Vermelha from July 1st, 2022?
- What are the names of the users who offer rides from São Gonçalo?
- What are the names of the users who offer rides with at least 2 passengers and a stop at Plaza Shopping?
The project has two folders: queries
and tables
. The queries
folder contains three SQL files with the queries, and the tables
folder contains four files with the DDL to create the tables.
- Clone the repository:
git clone https://github.com/mathunes/sispro-challenge-sql.git
- Navigate to the project directory:
cd sispro-challenge-sql
- Create the tables by running the SQL statements in the
tables
folder. - Load the data into the tables, if necessary.
- Run the SQL queries in the
queries
folder to answer the questions.
If you want to contribute to this project, please follow the guidelines below:
- Fork the repository.
- Create a new branch:
git checkout -b <my-new-branch>
- Make changes and test them.
- Add the changes:
git add .
- Commit your changes:
git commit -m "Add some feature"
- Push to the branch:
git push origin <my-new-branch>
- Submit a pull request to the original repository.
This project is licensed under the MIT License.