Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can group data by day by using a date function such as the DAY() function in Excel or the DATE_TRUNC() function in SQL. These functions will extract the day component of the date and allow you to group the data by day.

For example, if you have a table of sales data with a date column, you could use the following SQL query to group the data by day:

SELECT DATETRUNC('day', datecolumn) AS day, SUM(sales) as totalsales FROM salestable GROUP BY day

This will group the data by the day component of the date and give you the total sales for each day.