两个表store_inforation and geography 此表数据在图片
问题:连接Store_Information 表格与Geography表格,实现各区域各店铺销售情况,只显示两表出现共同store_name的记录(region_name,store_name,Sales )
我的答案
select A1.region_name region_name, sum(A2.Sales)Sales from geography A1, Store_information A2 where A1.store_name = A2.store_name group by A1.region_name;
将此代码运行完没有store_name !!!
问题2:同上,但要以内连接语法实现
select A1.region_name region_name, sum(A2.Sales) Sales from geography A1 inner join store_information A2 on A1.store_name = A2.store_name group by A1.region_name;
将此代码运行完没有store_name !!!
问题3:##连接Store_Information 表格与Geography 表格,实现各区域各店铺销售情况,左表全显示,右表只显示store_name在左表出现的记录(region_name ,store_name,Sales )
select*from geography A1 left join store_information A2 on A1.store_name = A2.store_name;
此代码多出了Date不知道如何隐藏
右连接也同样的问题 。。。。。。。崩溃了 ,,,,求大神