Please help to point out the error(s) in the SQL code:
select
c.cust_nam,
count s.qty_sold
from
customers c and
sales s
where
c.cust_id = s.cust_id,
s.sale_dat >= ‘20100101’,
s.sale_dat <= ‘20101231’
group by
c.cust_nam
Please help to point out the error(s) in the SQL code:
select
c.cust_nam,
count s.qty_sold
from
customers c and
sales s
where
c.cust_id = s.cust_id,
s.sale_dat >= ‘20100101’,
s.sale_dat <= ‘20101231’
group by
c.cust_nam
• google 'SQL Join' -胡說之- ♂ (189 bytes) () 01/08/2011 postreply 17:22:20
• 後麵的條件也不能用逗號,用 AND/OR -胡跟之- ♀ (0 bytes) () 01/08/2011 postreply 17:45:19
• 跟得好,這才名副其實 -胡說之- ♂ (0 bytes) () 01/08/2011 postreply 17:48:59
• 錯了,這個可不是胡跟:) -胡跟之- ♀ (0 bytes) () 01/08/2011 postreply 17:52:30
• 還是錯了,老師也不是胡說:D -胡跟之- ♀ (21 bytes) () 01/08/2011 postreply 18:05:22
• Group by customer name? Doesn't make sense -世界無童話- ♀ (0 bytes) () 01/08/2011 postreply 19:11:47
• 語法上沒問題,如果是公司名也make sense -胡跟之- ♀ (0 bytes) () 01/08/2011 postreply 19:49:25
• You can write like this -oops_yz- ♀ (394 bytes) () 01/08/2011 postreply 20:49:17
• 回複:Please help in SQL code and Thank you -未知未覺- ♀ (980 bytes) () 01/08/2011 postreply 22:23:49
• This is correct! -平安是福mtl- ♀ (0 bytes) () 01/09/2011 postreply 08:53:33
• 這個答案真標準,工整明了。:) -八音澗- ♀ (0 bytes) () 01/09/2011 postreply 18:22:43
• Thank 胡說之, 胡跟之, 世界無童話, oops_yz, 未知未覺, 平安是福mtl, 八音澗 -luck2010- ♀ (0 bytes) () 01/09/2011 postreply 21:01:17
• how about this: -greentree2010- ♀ (285 bytes) () 01/09/2011 postreply 22:03:27
WENXUECITY.COM does not represent or guarantee the truthfulness, accuracy, or reliability of any of communications posted by other users.
Copyright ©1998-2024 wenxuecity.com All rights reserved. Privacy Statement & Terms of Use & User Privacy Protection Policy