It's UWAweek 47

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 3 articles in this topic
Showing 3 of 684 articles.
Currently 113 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
12:26am Fri 6th Sep, ANONYMOUS

With Q1, it says to use a sub query, Do we have to do it that way or can we just use a join and compare the columns with the same cust id, then collect the data that has the creditcode of C that way


SVG not supported

Login to reply

👍?
helpful
7:35pm Fri 6th Sep, Mengxi L.

I think youou can solve the problem both ways,using a subquery with NOT IN,or using a LEFT JOIN to achieve the same result. But the hint encourages the use of a subquery to practice that method. You can have a try with both approaches in your terminal.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
2:41pm Wed 11th Sep, Adam W.

That is a good point, I didn't add in the check to make sure you need to use a sub-query, but it was a hint, and the question text didn't specifically say it HAD to be a sub-query, so use whatever works.

One of the interesting things about SQL in general, is that you can go about the same question multiple ways, and ultimately receive the exact same result. So for a question where we really want you to do the question one way, we have to add in external Python code to check it first, as the output is identical for some operations (e.g. joining tables purely with WHERE or by JOINs).

Adam.

"Mengxi Li" [email protected] wrote:

I think youou can solve the problem both ways,using a subquery with NOT IN,or using a LEFT JOIN to achieve the same result. But the hint encourages the use of a subquery to practice that method. You can have a try with both approaches in your terminal.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy