This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.
The following table contains details about various results of the games of Bridge groups throughout the years. Each row indicates the group number, name, date, the group’s score (in this particular game), and whether the group received a special award in that game. For example, in 2010.01.12 group A got a score of 432 but did not win a special award. As seen below, two groups won the special award throughout the years – Team D and Team B.
CREATE TABLE teams (team_id int, team_name varchar(25), score_date date, score_value int, special_award int) GO