SQL Queries - CAST Central Base - Queries on Metrics - How to get the list of quality rules attached to more than two technical criteria

Purpose of Query

This page provides you with the list of quality rules attached to more than two technical criteria.

Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server (question)
Microsoft SQL Server (question)
CSS(tick)
Query for CSS
SELECT D.metric_id, 
       D.metric_name, 
       Count(1) 
FROM   dss_metric_types D, 
       dss_metric_type_trees T, 
       dss_metric_types TC 
WHERE  D.metric_group = 1 
       AND TC.metric_group = 13 
       AND T.metric_id = D.metric_id 
       AND T.metric_parent_id = TC.metric_id 
GROUP  BY D.metric_id, 
          D.metric_name 
HAVING Count(1) > 1 
ORDER  BY 1 
Query result example

630;"Avoid data members that are not private";2
652;"Avoid Classes with a High Public Data Ratio (C++)";2
2230;"Use of style sheets";2
2242;"Avoid direct definition of JavaScript Functions in a Web page";2
2592;"Encapsulation compliance";2
2642;"Avoid Classes with a High Public Data Ratio (Visual Basic)";2
3576;"Avoid declaring public Fields";2
3650;"Avoid Classes with a High Public Data Ratio (C# .Net)";2
4566;"Avoid declaring Instance Variables without defined access type";2
4570;"Avoid declaring Non Final Class Variables with Public or Package access type";2
4572;"Avoid declaring Final Instance Variables that are not dynamically initialized";2
4602;"Avoid using Fields (non static final) from other Classes";2
4612;"Avoid using native Methods (JNI)";2
4768;"Avoid Classes with a High Public Data Ratio (JEE)";2
6174;"Avoid Classes with a High Public Data Ratio (PowerBuilder)";2
7306;"Avoid declaring Inner Classes";2
7308;"Avoid using Inner Classes";2
7794;"Avoid Classes with a High Public Data Ratio";2
8010;"Do not overload the ampersand, comma, logical AND or logical OR operators";2
8086;"Avoid types that own disposable fields and are not disposable";2

Query result interpretation

The query returns the list of quality rules attached to more than two technical criteria, the metrics id and the number of technical criteria related to the metric.

Query for Oracle
Enter the SQL query
Query result example

Query result interpretation

Query for SQL server
Enter the SQL query
Query result example

Query result interpretation

Notes/comments



Related Pages