Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: succesfully complete all challenges #55

Open
wants to merge 3 commits into
base: challenge-2
Choose a base branch
from

Conversation

Menendez2004
Copy link

Completed all assigned challenges, addressing the required tasks. All solutions are working

Completed all assigned challenges, addressing the required tasks. All solutions are working
ERD design already done for the laast challenge
Copy link

@fabio248 fabio248 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left you some comments on improvements and corrections that you can make.
We will talk about the ERD in the feedback meeting.

src/answers.sql Show resolved Hide resolved
src/answers.sql Outdated Show resolved Hide resolved





-- 5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this exercise at the begging said In this part, you need to CRATE A TRANSACTION with the following steps, so that means all the following items should be within a transaction. With that in mind the solution for e and f literals will change.

src/answers.sql Outdated Show resolved Hide resolved
src/answers.sql Outdated Show resolved Hide resolved
src/answers.sql Outdated Show resolved Hide resolved
src/answers.sql Outdated Show resolved Hide resolved
src/answers.sql Outdated

--(d). Put your answer here if the transaction fails(YES/NO): Yes the is failed cuz the mount is higher than the current balance

--(e and f). If the transaction fails, make the correction on step c to avoid the failure (the way to avoid the failure is tranfer less money than the current balance)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution will change based on my comment to wrap the whole exercise in a transaction.

src/answers.sql Outdated
Comment on lines 204 to 209
SUM(
CASE
WHEN m.account_from = a.id THEN -m.mount
WHEN m.account_to = a.id THEN m.mount
END
)AS total_money
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to do the same query several times. Remember do not repeat yourself.

src/answers.sql Show resolved Hide resolved
-problems with the comments lenguage
-same query several times
-confusion with the exercise ravnhq#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants