mysql - GROUP BY each 6 months in one record -
i having trouble retrieving data db through select query such:
select table.something table table.date between 'from' , 'to' group (each 6 months between , date).
any idea how can done without having recur view , external grouping through code.
something work:
select table.something, ceil(month(date)/6) monthvalue table table.date between 'from' , 'to' group monthvalue
Comments
Post a Comment