no filtrar productos por stock

This commit is contained in:
Cat /dev/Nulo 2024-01-15 15:55:05 -03:00
parent 23ea94ecd5
commit 4f135f8464

View file

@ -11,7 +11,7 @@ export const load: PageServerLoad = async ({ url }) => {
join precios p on p.ean = f.ean
where f.name match ${`"${query}"`}
group by p.ean
having max(p.fetched_at) and max(p.in_stock)
having max(p.fetched_at)
order by p.in_stock desc;`;
results = db.all(sqlQuery);
}