summaryrefslogtreecommitdiffstats
path: root/sql/views.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/views.sql')
-rw-r--r--sql/views.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/views.sql b/sql/views.sql
index 6ab5ef2..8edfa9f 100644
--- a/sql/views.sql
+++ b/sql/views.sql
@@ -17,6 +17,6 @@ CREATE VIEW IF NOT EXISTS invoice AS
WHERE product = id AND valid_from <= timestamp
ORDER BY valid_from DESC LIMIT 1)
END AS price
- FROM sells INNER JOIN products ON sells.product = products.id
+ FROM sales INNER JOIN products ON sales.product = products.id
ORDER BY timestamp;
COMMIT;