【发布时间】:2015-08-26 11:51:43
【问题描述】:
好的,所以我在这里做一些访问,但我无法弄清楚,已经通过搜索尝试了很多,但没有真正接近。我希望你们中的一些人知道该怎么做。
我的数据库中有一些表(只是一个简单的学校表)
产品表
Type Price Color Height Model
--------------------------------------------
KL47 69 B 150 Dames Normal Model
VRS02 73 W 170 Heren Smal Model`
副本表 - 产品
Copienr Type
------------------------
K664 KL47
T553 KL47
V3553 VRS02
V7744 VRS02
V9941 VRS02
客户表
Customrnr Companyname Adress
-----------------------------------------
1 Jiver Posthoorn 27
2 Veco Weebosserweg 21
3 V&D Omabakfietsjes 74
最后还有一张查看女巫客户租用女巫产品的表格
Rentnr Customernr Copienr Date-from Date-Till
-------------------------------------------------------
5 3 K664 11/5/2014 11/29/2014
6 3 T553 10/7/2014 12/13/2014
7 3 V3553 11/18/2014 12/19/2014
8 3 V3553 4/8/2015 8/12/2015
9 3 V7744 4/8/2015 7/8/2015
10 3 T553 5/4/2015 6/8/2015
现在我想要一张包含 V&D 公司今年迄今为止租用的所有产品的表格。 按每周总价分组。
到目前为止我有这个:
SELECT t.typen, c.copienr, date-from, date-till, companyname, price
FROM typen t, copies c, rented-vieuw r, customers c
WHERE bedrijfsnaam = 'V&D'
AND c.customernr = r.customernr
AND r.copienr = c.copienr
AND c.type = t.type
AND date-from >= #1/1/2015#;
此外,为了按饮食周的总价格分组,我尝试了很多。认为这甚至没有任何意义,但我无法弄清楚。 我希望你能帮助我。谢谢!
编辑:产品表中的价格是租用产品的成本/弱***
【问题讨论】:
-
我删除了mysql标签并将“access”更改为“ms-access”。
-
啊,谢谢!抱歉,IT 领域的新人(2 月开始上学)