无法显示数据PostgreSQL的货币格式

时间:2018-10-20 06:11:13

标签: sql postgresql

下面是我的代码,用于输出总计31295的1行,是正确的。

gameobject

但是,当我添加时,

SELECT  SUM(orders.quantity * products.price) as total
       FROM
        orders
       inner join products on products.id = orders.products_id
       inner join customers on customers.id = orders.customers_id WHERE order_date 
       BETWEEN CURRENT_DATE - INTERVAL '30 days' 
       AND CURRENT_DATE + INTERVAL '1 days'

它不断显示更多行的不同值。

0 个答案:

没有答案