Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Increment Display by Day
cornett
I am trying to view a MIN, MAX, and AVG value for each day of a month. I am bringing in two column values which have about 50-100 entries per day. I have variable parameters for the month and year, but how can I get the Min/Max/Avg values to run for each day of that month? Can I somehow use the MySQL AVG, MIN, and MAX functions to run for each day after the user specifies what month and year they want?
Find more posts tagged with
Comments
cornett
Do I need to create a data cube and use a crosstab control?
Hans_vd
Hi Cornett,<br />
<br />
You can use the grouping functions in MySQL or you can use grouping in BIRT.<br />
You certainly don't need a crosstab.<br />
<br />
If you want in the database, create a query like this<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>SELECT day, min(whatever you want), max(whatever you want), avg(whatever you want)
FROM your_table
WHERE year = ?
AND month = ?
GROUP BY day</pre>
<br />
<br />
Hope this helps
cornett
Ahh, that was it! I was missing the GROUP BY DAY! Thanks so much.