Company: StoneX_22july
Difficulty: medium
MMORPG Game Character Outfit Advisor An MMORPG game is under development. For its profile and inventory screens, write a query that advises every player on the best-quality items they currently own, separately for each item type. Item quality has three ranks, from lowest to highest: common < rare < epic . For every account and every item type the account owns at least one item of, find the highest quality among that account's items of that type, and list the names of all of the account's items of that type that have this quality. Table: accounts Column Type Description id INTEGER Primary key, the account id username TEXT The account's username (unique) Table: items Column Type Description id INTEGER Primary key, the item id type TEXT One of sword , shield , armor (an ENUM('sword','shield','armor') in the original schema) name TEXT The item's name (unique across items) Table: accounts_items Column Type Description account_id INTEGER References accounts.id item_id INTEGER Reference