Select the code of the product that is cheapest in each product category.
CREATE TABLE products (code VARCHAR, name VARCHAR, price INTEGER)
SELECT code, name, MIN(price) FROM products GROUP BY name
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE products (code VARCHAR, name VARCHAR, price INTEGER) Question: Select the code of the product that is cheapest in each product category. [/INST] SELECT code, name, MIN(price) FROM products GROUP BY name </s>