Hi,
I have wrote two queries, one to find the average for one date, and the second query to find the average for another date. And I stored the results of the query to a local string object. Is there anyway to compare the two averages by getting the difference between the two.
example query
Let's say that I get another query for the next 7 days, how do I compare the two averages from the two queries?
Note: Using Mysql 5.0, and JDBC app to connect to DB, table, etc (works fine)
just need help with the query in my program
Thanks,
I have wrote two queries, one to find the average for one date, and the second query to find the average for another date. And I stored the results of the query to a local string object. Is there anyway to compare the two averages by getting the difference between the two.
example query
Code:
String myQuery = "" + "select name, age, date, avg(count) from product where date=interval -7 Day + '2001-08-13' " + " group by name ";
Note: Using Mysql 5.0, and JDBC app to connect to DB, table, etc (works fine)
just need help with the query in my program
Thanks,
Comment