IBM interview question

1 star pattern question SQL join question