[英]Count different values in single column and show in their respective column using Access
I have a set of data of cars as follow: 我有一组汽车数据,如下所示:
| class | car |
| S | Hilux |
| M | Hilux |
| M | Toyota|
| M | Hilux |
| S | toyota|
| S | toyota|
| L | toyota|
And I want to show as per below: 我想显示如下:
| class | Hilux | Toyota |
| S | 1 | 2 |
| M | 2 | 1 |
| L | 0 | 1 |
How can it be done using Ms Access? 如何使用Access女士完成?
This might work: 这可能起作用:
TRANSFORM COUNT(car)
SELECT class
FROM Table_name
GROUP BY class
PIVOT car;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.