« first day (7 days earlier)  last day (15 days later) » 

Cam
1:33 PM
Hey dude, how are you?
Similar to the weekly overview, is there a way or example showing the next 6 months, but the output would display the month names instead?

Jan Feb Mar Apr May Jun

X X

X
Output could be like this
Could be similar to a monthly calendar overview
 
Cam
2:28 PM
SELECT DATE_FORMAT(sub.planner_start_date,'%M, %Y')
FROM
( SELECT
date_add('2018-12-01', INTERVAL seq.seq MONTH) AS planner_start_date
FROM
seq_0_to_11 AS seq
) as sub
ORDER BY sub.planner_start_date ASC

Got it to display the next 12 months.I am trying to display records over the next 12 months.
 
Cam
3:14 PM
This is the final query where I am displaying tenant contracts that are expiring over the next 12 months, is there a better way of doing it or improving this query please?

SELECT DATE_FORMAT(sub.planner_start_date, '%M, %Y') as month_name, GROUP_CONCAT( DISTINCT COALESCE(CONCAT(t.customer_name)), '') as tenant_name
FROM
( SELECT
'2017-01-01' + INTERVAL seq.seq DAY AS planner_start_date
FROM
seq_0_to_999999 AS seq
WHERE
seq.seq <= TIMESTAMPDIFF(DAY, '2017-01-01', '2017-12-31')
) as sub
LEFT JOIN t_customers_contract AS cc ON DATE_FORMAT(cc.renewal_date, '%Y-%m') = DATE_FORMAT(sub.planner_st
 

« first day (7 days earlier)  last day (15 days later) »