fork download
  1. -- your code goes here
  2. create table product
  3. (
  4. product_id INT,
  5. product_name VARCHAR(100),
  6. is_recyclable BOOLEAN,
  7. is_low_fat BOOLEAN
  8. );
  9.  
  10. insert into product(product_id,product_name,is_recyclable,is_low_fat)
  11. values(1 ,"Product A", TRUE, TRUE),
  12. (2 ,"Product B", TRUE, FALSE),
  13. (3 ,"Product C", FALSE, TRUE),
  14. (4 ,"Product D", TRUE, TRUE);
  15.  
  16. select product_id , product_name
  17. from product
  18. where (is_recyclable = TRUE) and (is_low_fat = TRUE);
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
1|Product A
4|Product D