有3个表
table1: custom_num,custom_name //custom_num不重复
table2: custom_num,product_num,prise //custom_num重复
table3: custom_num,repair_num,repair_time,repair_prise;//custom_num重复
现在的希望是,查找出所有repair_time在时间一和时间二之间的数据
custom_name,sum(prise),sum(repair_prise),custom_name
table1: custom_num,custom_name //custom_num不重复
table2: custom_num,product_num,prise //custom_num重复
table3: custom_num,repair_num,repair_time,repair_prise;//custom_num重复
现在的希望是,查找出所有repair_time在时间一和时间二之间的数据
custom_name,sum(prise),sum(repair_prise),custom_name
有3个表
table1: custom_num,custom_name //custom_num不重复
table2: custom_num,product_name,prise,num
table3: custom_num,repair_time,repair_prise
现在要查找出所有repair_time在time1和time2之间的数据:
custom_name,sum(prise*num),sum(repair_prise)
怎样才能实现呢?
from (table1 inner join table2 on table1.custom_num=table2.custom_num) inner join table3 on
table1.custom_num=table3.custom_num