I really need yours help to solve the below problem.
Code: Select all
I got the database as below:
CATEGORY | SERIES | COUNT(*)|
---------+---------+---------|
London | SERIES1 | 10 |
London | SERIES2 | 25 |
London | SERIES3 | 31 |
New York | SERIES1 | 54 |
New York | SERIES3 | 54 |
Paris | SERIES2 | 34 |
Code: Select all
try {
con = DriverManager.getConnection(url, "root", "");
data = new JDBCCategoryDataset(con);
String sql = "SELECT DISTINCT CATEGORY, SERIES, count(*) FROM STANDARD GROUP BY CATEGORY, SERIES;";
data.executeQuery(sql);
con.close();
}
How to make it Like below:
Code: Select all
count
| ___
| |S3 | ___
| |___| | | __ S=Series
| S2|___| |S3 | | |
| | | |___| | |
| |S1 | |S1 | |S2|
|-----------------------------------------
category1 category2 category3
please help me. thanks!
Rgds,
Bryan