Company: Media_Net_Product_Analysis
Difficulty: medium
Problem Description A chess tournament is being held which consists of several matches between various players and a computer. After every match, either the player or the computer is declared the winner. Write a SQL query to find the names of the players who have won at least one match and lost at most one match . Schema Table: Players Column Name Data Type Id INT Name VARCHAR Id is the primary key for this table. Table: Matches Column Name Data Type Player_Id INT Result INT This table does not have a primary key and may contain duplicate rows. Player_Id is a foreign key referencing Players.Id . The Result column indicates the outcome of the match for the player (1 = Win, 0 = Loss). Required Output Output a table with a single column named Name containing the distinct names of the qualifying players. The order of the results does not matter. Constraints or Notes Result will only contain values 0 (loss) or 1 (win). A player may play multiple matches. Duplicate names should not be return