diff --git a/README.md b/README.md index 36122ae..9fb8845 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 -``` \ No newline at end of file +```