Mysql & gt; query statement

Source: Internet
Author: User

Mysql> query statement * query multiple unique records with id 1 a 2 B 3 c 4 c 5 bselect id, name from s1 group by name1 a2 b3 c5 B * query records with the most repeated records SELECT keyword, count (*) AS count FROM article_keyword group by keyword order by count desc limit 20 * query repeat records and repeat Times select user_name, count (*) as count from user_table group by user_name having count> 1; * multi-join query s1 table id name3 a s2 table id s1_id age 1 2 122 3 23 SELECT * FROM 's2 'where 's1 _ id' = (SELECT id FROM 's1 'where' name' = 'A '); result 2 3 23

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.