fix sql query to only consider vending shops
This commit is contained in:
parent
ce4753fd6d
commit
6543f31acb
1 changed files with 3 additions and 2 deletions
|
@ -77,7 +77,8 @@ SELECT shops.title, items.name, shop_items.price, items.item_id,
|
||||||
LEFT JOIN shop_snapshots ON shop_snapshots.shop_id=shops.id
|
LEFT JOIN shop_snapshots ON shop_snapshots.shop_id=shops.id
|
||||||
LEFT JOIN shop_items ON shop_items.snapshot_id=shop_snapshots.id
|
LEFT JOIN shop_items ON shop_items.snapshot_id=shop_snapshots.id
|
||||||
LEFT JOIN items ON shop_items.item_id=items.id
|
LEFT JOIN items ON shop_items.item_id=items.id
|
||||||
WHERE shop_snapshots.last_seen_date=(SELECT MAX(last_seen_date) FROM shop_snapshots)
|
WHERE shops.type=1 AND
|
||||||
|
shop_snapshots.last_seen_date=(SELECT max(last_seen_date) FROM shop_snapshots)
|
||||||
) GROUP BY item_id
|
) GROUP BY item_id
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -89,4 +90,4 @@ This returns an estimate in MiB of the total storage occupied by the saved JSON
|
||||||
|
|
||||||
```
|
```
|
||||||
SELECT SUM(LENGTH(source))/1024/1024 FROM source_store
|
SELECT SUM(LENGTH(source))/1024/1024 FROM source_store
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue