Compare commits

..

3 commits

Author SHA1 Message Date
f645607adf search: elegir el que mas stock tenga 2024-01-05 15:41:19 -03:00
5754214498 search: poner cosas sin stock al final 2024-01-05 15:40:54 -03:00
3e4d91f330 devcontainer: corregir nombre 2024-01-05 15:20:12 -03:00
2 changed files with 3 additions and 2 deletions

View file

@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine // README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{ {
"name": "Alpine", "name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:debian", "image": "mcr.microsoft.com/devcontainers/base:debian",
"features": { "features": {

View file

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