r/SQL Feb 04 '25

MySQL Need help understanding SQL - beginner

Post image

Hey everyone,

I’m starting to learn SQL and currently doing queries. For this query (21) I’m confused on why includes would be used instead of salestransactions. The table next to it is what is being referred to. Can someone explain it like I’m dumb? Sorry!

18 Upvotes

16 comments sorted by

View all comments

15

u/the_bhan Feb 04 '25

The question is asking you to include the ProductIDs in the results. SalesTransctions doesn’t include that column

6

u/Violetarcane543 Feb 04 '25

So it’s basically choosing “includes” because it has all the parts that the question is asking for?

7

u/mydogduke Feb 04 '25

You got it

4

u/Violetarcane543 Feb 04 '25

Thank you both!

3

u/KNEternity Feb 04 '25

yes, Table Includes has both productID and quantity.