CST 363 - Week 2

 1. Example of a non-equality join:

We have a list of people and a list of products. We want to find out which products each person can afford based on their income. This join doesn’t use an equal condition. Instead, it uses a greater than (>) comparison.

English sentence:
Match each person with the products they can afford where their income is greater than the product's price.

SQL query:

select people.name, products.item, people.income, products.price
from people
join products on people.income > products.price;


2. Opinion on SQL as a language:
I think SQL is pretty easy to learn when it comes to basic queries. The structure is simple and readable. But it can get tricky when joins, groupings, or nested subqueries are involved. Once you practice it starts to make a lot more sense as you're essentially just pulling data from databases and files. The SQL language is what makes this process of pulling data easy because of its simple syntax and logic. 

Most challenging part:
The hardest part is turning complex word problems into SQL like when you’re working with multiple tables or need to use things like not exists, group by, or having. It’s not always obvious how to write the query just from the way the question is worded.

Comments

Popular posts from this blog

Week 4 - Educational & Career Goals, ETS Readiness, and Learning Reflections

Week 2 - Learning Strategies | Time Management | Project Management | Previous Capstones | Week Summary

Week 5 - Team Comments, Capstone Ideas, Weekly Journal, Industry Expert Interview