In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to take out duplicate lines from MySQL". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian to study and learn "how to take out duplicate lines from MySQL" together.
After grouping by this field, the number of rows in the group greater than 1 is a duplicate row. If it is greater than 1, you need to write having; but only group+having can only get summary values, not detailed data. To get details, you need to repeat traversal with subqueries:
select *
from A
where g in
(select g
from A
group by g
having count(*)>1)
SQL has no explicit set data type, and cannot hold grouped subsets, so it cannot perform subsequent multi-step operations on subsets, and it has to use lengthy subqueries.
This kind of set operation is convenient if you use the concentrator SPL, as long as one sentence:
=connect("mysqlDB").query("select * from A").group(g).select(~.len()>1).conj()
With explicit sets, more complex subsequent calculations can be done on subsets of groups, including enumerating groups, overlapping groups, and so on.
Thank you for reading, the above is "how to extract duplicate lines from MySQL" content, after the study of this article, I believe we have a deeper understanding of how to extract duplicate lines from MySQL this problem, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.