mysql statement writing
漂亮男人
漂亮男人 2017-05-18 10:49:22
0
2
613

A table has six fields ABCDEF. The requirement is to find out whether ABCD is consistent and merge it into one, and count how many different E's there are in the merged entries.
In other words, abcd is the same as one piece of data. Then abcd the same multiple pieces of data to e to deduplicate, the result is probably like this
ABCD2
How to write such a sql statement

漂亮男人
漂亮男人

reply all(2)
我想大声告诉你

select a,b,c,d,count(distinct(e)) from t group by a,b,c,d

曾经蜡笔没有小新
select *,count(distinct A) from table group by A,B,C,D;

Try it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template