This commit is contained in:
Cat /dev/Nulo 2024-08-24 11:48:30 -03:00
parent bef5a74fcd
commit fa46fc619b
3 changed files with 114 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{
"db_name": "SQLite",
"query": "select count(distinct ean) as count from precios",
"describe": {
"columns": [
{
"name": "count",
"ordinal": 0,
"type_info": "Integer"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false
]
},
"hash": "2e632fbda989abf0d8a88a1d3bc1de0a9aefb0d3f3cdc33d26158d09faed97b2"
}

View file

@ -0,0 +1,38 @@
{
"db_name": "SQLite",
"query": "with search_results as (\n select f.ean from precios_fts f\n where f.name match ? and f.ean != ''\n group by f.ean\n\t\t\tlimit 100\n )\n select p.id, p.ean, p.name, p.image_url from search_results as s\n join precios as p\n on p.ean = s.ean\n where p.fetched_at = (\n SELECT MAX(fetched_at)\n FROM precios as pf\n WHERE pf.ean = s.ean and pf.name is not null\n );",
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Integer"
},
{
"name": "ean",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "name",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "image_url",
"ordinal": 3,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
true,
true
]
},
"hash": "3ee249afda554bbffe736257af05aba689c71188ce1a869e01988ac7ca1220a2"
}

View file

@ -0,0 +1,56 @@
{
"db_name": "SQLite",
"query": "\nselect ean,fetched_at,precio_centavos,in_stock,url,name,image_url from precios\nwhere ean = ?\norder by fetched_at\n",
"describe": {
"columns": [
{
"name": "ean",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "fetched_at",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "precio_centavos",
"ordinal": 2,
"type_info": "Integer"
},
{
"name": "in_stock",
"ordinal": 3,
"type_info": "Integer"
},
{
"name": "url",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "name",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "image_url",
"ordinal": 6,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
true,
true,
false,
true,
true
]
},
"hash": "88a597e29390fb04bbc48d9f88303551e068ddc478b037354c62bc77bc70ad96"
}