Answering Business Questions Using SQL - Mission 6: Albums vs Individual Tracks

Hi there,

This is the mission: https://app.dataquest.io/m/191/guided-project%3A-answering-business-questions-using-sql/6/albums-vs-individual-tracks

Could you please help me clarify about the following points?

The store does not let customers purchase a whole album, and then add individual tracks to that same purchase (unless they do that by choosing each track manually). When customers purchase albums they are charged the same price as if they had purchased each of those tracks separately.

Q: Are they allowed to buy more than 1 entire album per invoice?

It is very common when you are performing an analysis to have ‘edge cases’ which prevent you from getting a 100% accurate answer to your question. In this instance, we have two edge cases to consider:

  • Albums that have only one or two tracks are likely to be purchased by customers as part of a collection of individual tracks.
  • Customers may decide to manually select every track from an album, and then add a few individual tracks from other albums to their purchase.

Q: The first edge case is not that difficult to address, but the second one not that much. And for me it’s not that clear whether we must address it within our code or not. Must we? Considering the following extract:

The company has previously done analysis to confirm that the second case does not happen often, so we can ignore this case also.

Thank you in advance for your help!

Hello,

I just finished the project and got the correct answer, so I’m gonna answer my own questions in case someone else has the same doubts I had:

Q: Are they allowed to buy more than 1 entire album per invoice?

RE: Considering that I got the correct answer and that my analysis was done to determine whether each invoice was only ONE full album or not, then the answer is: No. You must consider only 1 full album per invoice.

Q: The first edge case is not that difficult to address, but the second one not that much. And for me it’s not that clear whether we must address it within our code or not. Must we? Considering the following extract…

RE: You can completely ignore this case, don’t have to address it within your code.

Regards.

1 Like