101
0/304
Loading content...
A retail catalog system tracks nutritional and packaging compliance flags per product.
Table: products
Task: Return the IDs of products that satisfy both conditions simultaneously:
Output requirements:
Supported submission environments:
products:
| product_id | low_fats | recyclable |
|------------|----------|------------|
| 0 | Y | N |
| 1 | Y | Y |
| 2 | N | Y |
| 3 | Y | Y |
| 4 | N | N |[
{"product_id":1},
{"product_id":3}
]Only products 1 and 3 have both required compliance flags set to Y.
products:
| product_id | low_fats | recyclable |
|------------|----------|------------|
| 10 | N | N |
| 12 | Y | N |
| 14 | N | Y |[]No product satisfies both filters, so the result is empty.
products:
| product_id | low_fats | recyclable |
|------------|----------|------------|
| 105 | Y | Y |
| 7 | Y | Y |
| 51 | N | Y |
| 23 | Y | Y |[
{"product_id":7},
{"product_id":23},
{"product_id":105}
]Rows are filtered first, then ordered by product_id ascending.
Constraints