首页 > 解决方案 > 你会帮我吗?我不断收到错误代码 1064,我不明白为什么

问题描述

我使用 Mysql 工作台不断收到错误代码 1064

- - - - - 代码 - - - - - -

use sql_invoicing;

select
  'Total Invoice',
  sum(invoice_total) as 'Total Sales',
  sum(payment_total) as 'Total Payment'
from
  (
    select
      i.number as 'Invoice number',
      i.client_id,
      c.name,
      i.invoice_total,
      i.payment_total as 'Total Payments',
      pm.name
    from
      invoices i
      left join clients c on i.client_id = c.client_id
      left join payments p on i.invoice_id = p.invoice_id
      left join payment_methods pm on p.payment_method = pm.payment_method_id
    where
      pm.name is not null
    order by
      client_id desc
  ) as 'R'

我无法弄清楚语法错误是什么:(。

预先感谢您的帮助

标签: mysql-error-1064

解决方案


推荐阅读