Skip to content

Suggestion to Improve "Coalesce" Task with More Comprehensive Data #25

@replakcan

Description

@replakcan

Hi,

First of all, thank you for the great SQL teaching resource I really enjoyed the exercises.

While working on the final task titled "Coalesce", I noticed that the current dataset might not fully evaluate the intended logic of prioritizing weapons. Specifically, both COALESCE(tank, gun, sword) and COALESCE(tank, sword, gun) return the same output due to the absence of a case where tank is NULL but both gun and sword are present.

I think adding an extra row like this would make the exercise more complete:

INSERT INTO fighters (name, gun, sword, tank)
VALUES ('alper', 'pistol', 'katana', NULL);

This would ensure that the order of precedence in COALESCE is actually tested.

Thanks again for the helpful content!

Best regards,
Alper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions