Witam czy ktoś mógłby w jakiś sposób przerobić te zapytania aby działały szybciej ??
select * from product p
join offer o on p.product_id=o.product_id
where p.attributes @> '{"Producent": "Sony"}'
order by name;
select * from product p
where p.price between 1000 and 2000 or p.attributes ? 'trwałośc' and
p.name like '%klimatyzator%';
select name, count(1)
from product
join offer on product.product_id=offer.product_id
where offer.price>40 or product.name='Klimatyzacja'
group by name
having count(1)>1;
select product_id, name, description, price
from product
where name='cos' and price>20.00
order by price desc;
select name, count(1)
from product
group by name
having count(1)>1;