Sonar database table relationship finishing one (cont.)

Source: Internet
Author: User

Introduction: Sonar platform is a popular static code scanning platform, it is necessary to learn and understand its database structure for ease of use and two times of development.

Title, at present the network does not find relevant content, only oneself slowly tidy up, as the information, for query.

=========================================================================================

Query the most frequently scanned rule for a month: SELECT i.rule_id,r.name as Rulename,count (*) as Count,from_unixtime (i.created_at/1000) as Createtime, R.priority,i.severity,r.plugin_name from issues i,rules r WHERE i.rule_id = R.id and From_unixtime (i.created_at/1000) &lt ;‘ 2017-09-01 ' and From_unixtime (i.created_at/1000) > ' 2017-08-01 ' GROUP by i.rule_id ORDER by COUNT desc================ ========================================================================= Querying all items: SELECT NAME from Projects WHERE Scope= ' PRJ ' ========================================================================================= Query all questions in the month and the corresponding project name, author, rule ID, severity level, and more: SELECT P.name as Projectname,i.rule_id,i.message,i.author_login,from_unixtime ( i.created_at/1000) as createtime,i.severity from issues i,projects pwhere p.project_uuid=i.project_uuid and P.scope= ' PRJ ' and From_unixtime (i.created_at/1000) < ' 2017-09-01 ' and From_unixtime (i.created_at/1000) > ' 2017-08-01 ' ORDER by rule_id desc========================================================================================= Author Original technical Articles, reproduced please indicate the source

Sonar database table relationship finishing one (cont.)

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.