filtration homework
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
select * from products
|
||||
|
||||
select name, category, price, price * 1.3 as price_with_markup, price * 1.5 as price_with_vat
|
||||
from products
|
||||
where in_stock is true and category != 'smartwatch' and price between 100 and 1300;
|
||||
|
||||
select name, price, price * 0.85 as price_with_discount
|
||||
from products
|
||||
where price < 100 or price > 1000;
|
||||
|
||||
select id, name, category, price from products
|
||||
where category in ('tablet', 'smartphone', 'mouse') and price > 100;
|
||||
|
||||
select name, category, price from products
|
||||
where name not ilike '%iphone%';
|
||||
|
||||
select name, category, price from products
|
||||
where name ilike '%pro%';
|
||||
|
||||
select name, category, price from products
|
||||
where name ilike '%mx%'
|
||||
order by price desc;
|
||||
Reference in New Issue
Block a user