Home  >  Article  >  Database  >  mysql-MySQL:多字段复合统计

mysql-MySQL:多字段复合统计

WBOY
WBOYOriginal
2016-06-06 09:35:50895browse

mysql

菜鸟求助:eves表中有三个国家字段,nat1, nat2, nat3,nat1为非空,其它两个不一定有数据。现在想统计3列中每个国家(包括出现在nat2和nat3里的国家)出现的次数,请问如何SELECT?感谢!!试过COUNT和GROUP BY,似乎无法实现啊……

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn