Obtener Categoría Por Precio de Producto
Excelente, hemos obtenido la cantidad de productos en cada categoría. Ahora necesitamos recuperar las categorías donde los productos cuestan más de cierta cantidad de dinero.
Solo un recordatorio de que estamos trabajando con dos tablas.
product:
Swipe to start coding
Your task is to retrieve the unique category names that have products with a price higher than 450. Use the WHERE clause for this, where you compare 450 with the value of the price column.
There should be only one column in the output - category.name. You do not include the price column in the SELECT section; you only use it in the WHERE section.
Brief Instructions
- Retrieve the
category.namecolumn from thecategorytable. - Use
DISTINCTto get only unique values. - Join the
producttable using aJOINstatement. - The common column for both tables is
category.id = product.category_id. - Use a
WHEREclause with the conditionprice > 450.
Solución
¡Gracias por tus comentarios!
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
What is the specific amount of money to use as the threshold?
Can you show me how to filter the categories based on product price?
Which data source or table should I use to retrieve the product prices?
Awesome!
Completion rate improved to 4
Obtener Categoría Por Precio de Producto
Desliza para mostrar el menú
Excelente, hemos obtenido la cantidad de productos en cada categoría. Ahora necesitamos recuperar las categorías donde los productos cuestan más de cierta cantidad de dinero.
Solo un recordatorio de que estamos trabajando con dos tablas.
product:
Swipe to start coding
Your task is to retrieve the unique category names that have products with a price higher than 450. Use the WHERE clause for this, where you compare 450 with the value of the price column.
There should be only one column in the output - category.name. You do not include the price column in the SELECT section; you only use it in the WHERE section.
Brief Instructions
- Retrieve the
category.namecolumn from thecategorytable. - Use
DISTINCTto get only unique values. - Join the
producttable using aJOINstatement. - The common column for both tables is
category.id = product.category_id. - Use a
WHEREclause with the conditionprice > 450.
Solución
¡Gracias por tus comentarios!
single