【发布时间】:2013-06-06 18:42:01
【问题描述】:
我有 4 张桌子:
#table 1 columns - areacode,section_number,maint_charge
#table 2 columns - section_number,discount,fee,total_Maint_charge
#table 3 columns - areacode, statename
#table 4 columns - section_number , customer
映射如下:
#table1.areacode = #table3.areacode
#table1.section_number = #table2.section_number
我想得到这样的东西:
state,section_number,maint_charge,maint_charge/total_maint_charge,
fee*(maint_charge/total_maint_charge)
谢谢
【问题讨论】:
-
3 个表连接就像 2 个表连接一样工作。您只需添加另一个
join子句。 -
这个问题没有显示任何研究工作。 做好功课很重要。告诉我们您发现了什么以及为什么它不能满足您的需求。这表明您已经花时间尝试帮助自己,它使我们免于重复明显的答案,最重要的是它可以帮助您获得更具体和相关的答案。 FAQ.
标签: sql-server inner-join