fix sql query to only consider vending shops

This commit is contained in:
King_DuckZ 2020-09-07 01:57:43 +01:00
parent ce4753fd6d
commit 6543f31acb

View file

@ -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_items ON shop_items.snapshot_id=shop_snapshots.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
```