https://github.com/zipcodecore/sql.givemethegoods
https://github.com/zipcodecore/sql.givemethegoods
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zipcodecore/sql.givemethegoods
- Owner: ZipCodeCore
- Created: 2019-11-19T15:29:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-04T06:13:27.000Z (about 4 years ago)
- Last Synced: 2025-06-26T07:03:13.192Z (6 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 51
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Give Me the Goods: More Introductory SQL Queries
## Like
### Wildcards (Regex)
Select all records from the **Students** table where the second letter of the **City** is an "a".
*(Add your query to the file exercise1.sql)*
Select all records from the **Students** table where the first letter of the **City** is an "a" or a "c" or an "s".
*(Add your query to the file exercise2.sql)*
Select all from the **Students** table records where the first letter of the **City** starts with anything from an "a" to an "f".
*(Add your query to the file exercise3.sql)*
Select all records from the **Students** table where the first letter of the **City** is NOT an "a" or a "c" or an "f".
*(Add your query to the file exercise4.sql)*
## IN
Use the **IN** operator to select all the records from the **Students** table where **Country** is either "Sint Maarten" or "Haiti".
*(Add your query to the file exercise5.sql)*
Use the **IN** operator to select all the records from the **Students** table where **Country** is NOT "Sint Maarten" and NOT "Haiti".
*(Add your query to the file exercise6.sql)*
## Between values
Use the **BETWEEN** operator to select all the records from the **Courses** table where the value of the **CreditHours** column is between 10 and 20.
*(Add your query to the file exercise7.sql)*
Use the **BETWEEN** operator to select all the records from the **Courses** table where the value of the **CreditHours** column is NOT between 10 and 20.
*(Add your query to the file exercise8.sql)*
Use the **BETWEEN** operator to select all the records from the **Courses** table where the value of the **CourseName** column is alphabetically between 'ColdFusion' and 'Python'.
*(Add your query to the file exercise9.sql)*
## Aliases
When displaying the **Students** table, make an alias of the **PostalCode** column, the column should be called **Zip** instead.
*(Add your query to the file exercise10.sql)*
When displaying the **Students** table, refer to the table as **Learners** instead of Students.
*(Add your query to the file exercise11.sql)*