任务:显示三月份在浦那和加尔各答地点发生的客户姓名及其订单
顾客:
CUST_ID CUST_NAME LOCATION
---------------------------------
1 A HYD
2 B PUNE
3 C DELHI
4 D KOLKATA
订单:
ORDER_ID CUST_ID AMOUNT DATE
----------------------------------
100 3 1000 2019-03-22
101 2 2000 2019-03-12
103 1 3000 2019-04-11
104 2 5000 2019-04-10
105 3 6000 2019-02-18
询问:
SELECT
c.cust_name, c.location,
CONVERT(VARCHAR(3), Date1, 100) AS Month
FROM
customers1 c
FULL OUTER JOIN
orders o ON o.cust_id = c.cust_id
WHERE
c.LOCATION = 'PUNE' OR c.LOCATION = 'KOLKATA'
GROUP BY
date1
HAVING
Month = 'Mar'
我收到此错误:
消息 207,级别 16,状态 1,第 7 行
无效的列名称“月”